email on the web (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


wizard_oz -> email on the web (5/11/2005 6:28:22)

Hi, I need HELP with email to the web. I created this code
<%
Dim MyMail
Set MyMail = Server.CreateObject("CDONTS.NewMail")
MyMail.From = "[email=justme@myaddress.com]justme@myaddress.com[/email]"
MyMail.To = "user[email=user@main.com]@myaddress.com[/email]"
MyMail.Subject = "sending email via CDONTS NewMail"
MyMail.BodyFormat = 1
MyMail.MailFormat = 0
MyMail.Importance = 2
MyMail.Body = "Sending email with CDONTS NewMail" &_
     "objects is easy! Try it!"
MyMail.Attachfile "c:\logo99.jpg", "logo99.jpg", 1
MyMail.Send , "[email=user@futuremodels.co.il]user@myaddress.com[/email]", "new subject"
Set MyMail = Nothing
%> 


and it works fine with my computer on IIS but on the web I have a probem with sending this files, I need to make a path to send the file to the web, How do I create a path on my script?




rdouglass -> RE: email on the web (5/11/2005 11:44:59)

quote:

How do I create a path on my script?


Is the file on the web or on your local computer?  If on the host (web) then you should be able to do something like:

MyMail.Attachfile Server.Mappath("/images/logo99.jpg"), "logo99.jpg", 1

That would be assuming the file logo99.jpg file is in the images folder off the root of the web.

That help any?




wizard_oz -> RE: email on the web (5/15/2005 1:36:44)

Thanks but the file is ob the local computer




Spooky -> RE: email on the web (5/15/2005 2:43:25)

Well - the file will need to be on the web server then use code similar to what rd suggests?




wizard_oz -> RE: email on the web (5/15/2005 3:53:57)

No, because I would like that some poeple will send me thier picture through email but not from email software , I need them to send me the picture from my asp page,and as you can see it has to be from their local computer




Spooky -> RE: email on the web (5/15/2005 4:35:06)

No - the user needs to upload the picture to the web server first - so it can then be attached to your email.
Youll need an upload component to be able to do that




wizard_oz -> RE: email on the web (5/15/2005 5:28:12)

do you have any example for the upload component ? I'd never used it before




Spooky -> RE: email on the web (5/15/2005 5:52:12)

It really depends what your host has available - although there is a script based example here :

http://www.frontpagewebmaster.com/m-236138/tm.htm

Its not exactly what you want, but may give you some help?




wizard_oz -> RE: email on the web (5/15/2005 6:06:37)

I don't care that the client will upload his picture to the server but I need to send this message as email. Do you have any other idea how to upload a file to a web server with some input text?




Spooky -> RE: email on the web (5/15/2005 16:38:46)

Im not sure what else to tell you? the upload information is above - do you understand the process that is required?




wizard_oz -> RE: email on the web (5/17/2005 7:22:52)

No, I tryied to understand but I don't, all I want is to make upload for the client into a database and from your scripts I get errors in upload.asp, line 146
can you give m me an example that working?




rdouglass -> RE: email on the web (5/17/2005 13:45:14)

(I'll jump back in...)[;)]

Actually that code does work quite well.  Usually when you have a problem with first installing an upload component is  permissions and / or configuration.

See, part of the problem is that you want people to be able to send you their picture WITHOUT using an email app.

To do this *easily* from a web page you MUST (repeat MUST) upload the file to the server first.  It can be done other ways but we're trying to keep it as simple as possible and this method isn't simple just simpler than others.

To upload files to a server requires very specific permissions and file/directory paths.  It has been my experience that problems with upload scripts almost always go back to either improper server permissions for the IUSR_machinename or improperly configured paths.  I'd suggest re-visiting that script and research a little more.

I don't want to sound mean but Spooky WAS pointing you to a script that works.  If you're looking for a free, drop-in-and-go solution, I don't know of any and if you find one please post it here.  I'm sure there would be many, many folks interested in it.  The point is is that it's just not that easy to set up.  Most folks here are very willing to help but there usually involves *some* work and/or research on the posters behalf.

EDIT:  Have you reconsidered yet using an email app?  Most people on the web have 'em already (email app that is) and if they don't, they probably don't have electronic photos to send anyways.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875