PDA

View Full Version : find any cdonts errors?


webmarkart
11-12-2002, 03:34 PM
I am using the attatched include file to insert into a db and then email me and the person who submitted the form. It inserts into the db fine, but the email never gets sent to either address. I contacted my service provider and they have confirmed that cdonts are enabled and this is the lame example of cdonts that they gave me (http://general-hosting.com/lib/scripts/ASP_Send.txt) which didn't work either. They also confirmed that smtp is allowed for my domain. Can someone look at the file I'm using and let me know if its a problem with my code or my host? Thanks...

(ps: I'll give props when due... I modified the code from mhtml)

I originally posted this in the General forum and asked boxer to move it here but after a day I decided to repost it.

yanira
11-12-2002, 06:16 PM
I tried it, and it sent the response and autoresponder, of course without doing the insert etc...using my email, changing the connection, etc.

I received both:

"Because! AutoResponse"

and

"Because!"

Test the cdont with a simple code, just to see if it works.
In VBscript I test it with something very simple only for testing purposes like:

<%
response.buffer = true
set mailer = server.createobject("CDONTS.NewMail")
mailer.subject = "test message"
mailer.from = "youremail"
mailer.to = "yanira_cm@yahoo.com"
mailer.body = "This is only a test "
mailer.send
set mail = nothing
%>

whammy
11-14-2002, 12:09 AM
To test it, try using an email address that is in use on your server... like webmaster@yourserver.com or something.

Usually if there is a problem that will work. Perhaps it's some setting in IIS?

Since you are the webmaster there, you should be able to send it to yourself from yourself, and cc or bcc the sender.

You might also want to do a google search and/or check out 4guysfromrolla.com's ASP email FAQs. I might be interested to know why it doesn't always work, as well, but I haven't really had the time to research it. Perhaps Glenn or Roy know.

webmarkart
11-14-2002, 02:55 AM
thanks guys, I'll try both of your suggestions and let you know...