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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email not working

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
ignoring the lack of dim statements(they are at the top of the page) why doesn't this send?

Set objMail = Server.CreateObject("CDONTS.NewMail")
with objMail
.From = "forms@sfcvb.com"
'.To = "jplain@sfcvb.org"
.to=te
'Response.Write te
.Subject = "A postcard from San Francisco!"

'create html email
note = "You've just received a postcard from San Francisco. To view it"
note = note& &quot;,<a href=' & id & &quot;>Click here</a>&quot;

HTML = HTML & &quot;<HTML>&quot;
HTML = HTML & &quot;<HEAD>&quot;
HTML = HTML & &quot;<TITLE>A postcard from San Francisco</TITLE>&quot;
HTML = HTML & &quot;</HEAD>&quot;
HTML = HTML & &quot;<BODY bgcolor=&quot;&quot;#FEECCB&quot;&quot;>&quot;
HTML = HTML & &quot;<CENTER>&quot; & note
HTML = HTML & &quot;

&quot;
HTML = HTML & &quot;</BODY>&quot;
HTML = HTML & &quot;</HTML>&quot;

'you need TO add these lines FOR the mail
'to be sent in HTML format
objMail.BodyFormat = 0
objMail.MailFormat = 0

Response.Write note 'test to see if the id worked
objMail.Body = HTML
objMail.importance = 0
objMail.Send
Set objMail = nothing
end with

Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Bastien,
does it work if you don't use the &quot;with&quot; statement, and instead use:


objMail.From = &quot;forms@sfcvb.com&quot;
'.To = &quot;jplain@sfcvb.org&quot;
objMail.to=te
'Response.Write te
objMail.Subject = &quot;A postcard from San Francisco!&quot; ======================================

if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top