Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: CDONTS emails


Message #1 by "Paul McKeever" <paul@f...> on Mon, 25 Feb 2002 12:57:04
Hey all,



I've been using a CDONTS script to generate email from forms for some 

time. However, after some testing, it appears that we don't always receive 

the mail from it. Having spoken to Fasthosts who provide our hosting they 

say it isn't a problem with the server.



The script is below. Can anyone see a problem with it? I have no idea what 

could be wrong - its not exactly complex...



Cheers in advance,







Paul McKeever

--------------------

http://www.front-online.com/

Front



<%

' set up email values

Dim strName, strEmail, strComments



strName = Request.Form("name")

strEmail = Request.Form("email")

strComments = Request.Form("comments")



strSubject = "re: nistudent.com - from 'feedback' page"



' create email

Set objNewMail = Server.CreateObject("CDONTS.NewMail")



objNewMail.From = strName & "<" & strEmail & ">"

objNewMail.Subject = strSubject

objNewMail.To = "info@f..."

objNewMail.Body = strComments



' send email

objNewMail.Send

Set objNewMail = Nothing

 

' show thankyou page

Server.Transfer "../content/thankyou.asp"

%>
Message #2 by "Gerhard Wentink" <data@w...> on Mon, 25 Feb 2002 17:39:27 +0100
You must be sure that a FROM is provided. When there is no FROM the smtp

server does not send the message but keeps it in the Badmail folder.

You can test if the user provided an e-mail address, if not just give a

dummy address (e.g. dummy@e...) just to satisfy the smtp server.

 Regards



Gerhard Wentink



----- Original Message -----

From: "Paul McKeever" <paul@f...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Monday, February 25, 2002 12:57 PM

Subject: [asp_web_howto] CDONTS emails





> Hey all,

>

> I've been using a CDONTS script to generate email from forms for some

> time. However, after some testing, it appears that we don't always receive

> the mail from it. Having spoken to Fasthosts who provide our hosting they

> say it isn't a problem with the server.

>

> The script is below. Can anyone see a problem with it? I have no idea what

> could be wrong - its not exactly complex...

>

> Cheers in advance,

>

>

>

> Paul McKeever

> --------------------

> http://www.front-online.com/

> Front

>

> <%

> ' set up email values

> Dim strName, strEmail, strComments

>

> strName = Request.Form("name")

> strEmail = Request.Form("email")

> strComments = Request.Form("comments")

>

> strSubject = "re: nistudent.com - from 'feedback' page"

>

> ' create email

> Set objNewMail = Server.CreateObject("CDONTS.NewMail")

>

> objNewMail.From = strName & "<" & strEmail & ">"

> objNewMail.Subject = strSubject

> objNewMail.To = "info@f..."

> objNewMail.Body = strComments

>

> ' send email

> objNewMail.Send

> Set objNewMail = Nothing

>

> ' show thankyou page

> Server.Transfer "../content/thankyou.asp"

> %>




$subst('Email.Unsub').

>





Message #3 by "Drew, Ron" <RDrew@B...> on Mon, 25 Feb 2002 13:28:20 -0500
Write a quick little javascript to make sure the FROM strEmail has a

valid email address syntax.  If nothing exists (user did not input) STMP

goes nowhere and put it into a folder on your server.  So stop it before

the CDONTS get executed.



-----Original Message-----

From: Paul McKeever [mailto:paul@f...]

Sent: Monday, February 25, 2002 7:57 AM

To: ASP Web HowTo

Subject: [asp_web_howto] CDONTS emails



Hey all,



I've been using a CDONTS script to generate email from forms for some

time. However, after some testing, it appears that we don't always

receive

the mail from it. Having spoken to Fasthosts who provide our hosting

they

say it isn't a problem with the server.



The script is below. Can anyone see a problem with it? I have no idea

what

could be wrong - its not exactly complex...



Cheers in advance,







Paul McKeever

--------------------

http://www.front-online.com/

Front



<%

' set up email values

Dim strName, strEmail, strComments



strName =3D Request.Form("name")

strEmail =3D Request.Form("email")

strComments =3D Request.Form("comments")



strSubject =3D "re: nistudent.com - from 'feedback' page"



' create email

Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")



objNewMail.From =3D strName & "<" & strEmail & ">"

objNewMail.Subject =3D strSubject

objNewMail.To =3D "info@f..."

objNewMail.Body =3D strComments



' send email

objNewMail.Send

Set objNewMail =3D Nothing



' show thankyou page

Server.Transfer "../content/thankyou.asp"

%>




$subst('Email.Unsub').

Message #4 by "George Draper" <georgedraper@a...> on Mon, 25 Feb 2002 21:20:42 -0500
Also, I noticed that my IIS smtp service checks if the FROM address has a

valid domain name.  If not, it stays in the queue.  I don't know the

rationale for it staying in the queue instead of going to the badmail

folder, but that's what I'm seeing.





----- Original Message -----

From: "Drew, Ron" <RDrew@B...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Monday, February 25, 2002 1:28 PM

Subject: [asp_web_howto] RE: CDONTS emails





Write a quick little javascript to make sure the FROM strEmail has a

valid email address syntax.  If nothing exists (user did not input) STMP

goes nowhere and put it into a folder on your server.  So stop it before

the CDONTS get executed.



-----Original Message-----

From: Paul McKeever [mailto:paul@f...]

Sent: Monday, February 25, 2002 7:57 AM

To: ASP Web HowTo

Subject: [asp_web_howto] CDONTS emails



Hey all,



I've been using a CDONTS script to generate email from forms for some

time. However, after some testing, it appears that we don't always

receive

the mail from it. Having spoken to Fasthosts who provide our hosting

they

say it isn't a problem with the server.



The script is below. Can anyone see a problem with it? I have no idea

what

could be wrong - its not exactly complex...



Cheers in advance,







Paul McKeever

--------------------

http://www.front-online.com/

Front



<%

' set up email values

Dim strName, strEmail, strComments



strName = Request.Form("name")

strEmail = Request.Form("email")

strComments = Request.Form("comments")



strSubject = "re: nistudent.com - from 'feedback' page"



' create email

Set objNewMail = Server.CreateObject("CDONTS.NewMail")



objNewMail.From = strName & "<" & strEmail & ">"

objNewMail.Subject = strSubject

objNewMail.To = "info@f..."

objNewMail.Body = strComments



' send email

objNewMail.Send

Set objNewMail = Nothing



' show thankyou page

Server.Transfer "../content/thankyou.asp"

%>




$subst('Email.Unsub').






$subst('Email.Unsub').



Message #5 by "Ken Schaefer" <ken@a...> on Tue, 26 Feb 2002 13:36:42 +1100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "George Draper" <georgedraper@a...>

Subject: [asp_web_howto] RE: CDONTS emails





: Also, I noticed that my IIS smtp service checks if the FROM address has a

: valid domain name.  If not, it stays in the queue.  I don't know the

: rationale for it staying in the queue instead of going to the badmail

: folder, but that's what I'm seeing.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



It will/should go to badmail eventually. It's probably waiting for a timeout

period. Failure to resolve a domain name might be due to:

a) DNS problems

b) domain not existant



(a) is usually transitory

(b) is not



Hence it will wait to see if the problem goes away (a), or not (b). If (b)

then the mail goes to badmail.



Cheers

Ken




  Return to Index