Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MyCDONTSMail.Send

Status
Not open for further replies.

jcroft

Programmer
Aug 23, 2001
52
US
Below is my code...I do a response.write before and after it and the variables are there...however it is not sending...how do you debug to see where problem is?

Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.MailFormat = cdoMailFormatMIME
MyCDONTSMail.From= whorespond
MyCDONTSMail.To= email
MyCDONTSMail.Cc="boo.hoo@nomail.com"
MyCDONTSMail.Subject="Response to your comments/suggestions"
MyCDONTSMail.BodyFormat=cdoBodyFormatHTML
MyBody = fname & &quot; &quot; & lname & &quot;<BR><BR>&quot;
MyBody = MyBody & responsetocomments & &quot;<BR><BR>&quot;
MyBody = MyBody & whorespond
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing

Thanks,
jcroft
 
I've checked your code and it works OK provided that you supply values for the variables. Below is your code that I slightly changed, in which I received an email after running it.

<%@LANGUAGE=&quot;VBSCRIPT&quot;%>

<%
Dim whorespond, strEmail, fname, lname, responsetocomments
whorespond = &quot;someone@somewhere.com&quot;
fname = &quot;fname&quot;
fname = &quot;fname&quot;
responsetocomments = &quot;doerayme&quot;
strEmail = &quot;yourname@yourdomain.net&quot;
%>

<% Set MyCDONTSMail = CreateObject(&quot;CDONTS.NewMail&quot;)
MyCDONTSMail.MailFormat = cdoMailFormatMIME
MyCDONTSMail.From= whorespond
MyCDONTSMail.To= strEmail
MyCDONTSMail.Cc=&quot;boo.dddhoo@nomail.com&quot;
MyCDONTSMail.Subject=&quot;Response to your comments/suggestions&quot;
MyCDONTSMail.BodyFormat=cdoBodyFormatHTML
MyBody = fname & &quot; &quot; & lname & &quot;<BR><BR>&quot;
MyBody = MyBody & responsetocomments & &quot;<BR><BR>&quot;
MyBody = MyBody & whorespond
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing %>

So basically all you should need to do is change the value of strEmail to your email address for it to work.

If this still doesn't work, I would imagine that it would be your smtp server settings that will need to be changed. For some very good info. about sending email using ASP, checkout
 
Thank you, Decus, for your time and help...jcroft
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top