The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Problem Sending Email in ASP

<%
Set Mail=Server.CreateObject(“CDONTS.NewMail”)Mail.To=”me@mydomain.com”
Mail.From=”testing-my@SP-Script.com”
Mail.Subject=”Just testing my script”
Mail.Body=”Hey! I am sending this email through an ASP Page and guess what? I haven’t learnt much yet, but know that ASP is very powerful.”
Mail.Send
Set Mail=nothing
%>

I save the code in a file called sendING_email.asp
When I try to execute the file I get this error:

First One:
Get rid of the funky quotes that you are using. You are using the ASCII & #148; character and ASP is looking for the & #34; ASCII character.

Change this: ”
To this: "

Second One:

Code:

Mail.Body=”Hey! I am sending this email through an ASP Page and
guess what? I haven’t learnt much yet, but know that ASP is very
powerful.”

Will throw an error due to the fact that it wraps to more than 1 line.

Try this code instead and note that the only difference is the use of the proper quotes character and the fact that I am concatenating the lines of your Mail.Body. In addition be SURE to use a valid FROM address that is valid for the account or you will wait all day for that email that will never come