View Single Post
  #4 (permalink)  
Old November 8th, 2009, 06:17 PM
mat41 mat41 is offline
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;Hi thanks for all the help. I've got the email sending, but it's only sending a link to the page that I would like to send.

But thats alll you have in the 'objMail.HTMLBody' line so thats all it will send. Place more info here to include it in the body of the email. Why are you using this line:

objMail.TextBody

I cant imagine why you would use both.......Anyhow, your mail code is not in the CDOSYS (which is the reccomended mail method) format I believe to be the reccomended syntax; What I use is:

<%
function SendEmail(c)
Const cdoSendUsingPort = 2
Dim iMsg,iConf,Flds,strHTML,strSmartHost
StrSmartHost = "10.?.?.?" 'place you SMTP address here
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/con...tion/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/con...ion/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/con...nectiontimeout") = 10
.Update
End With
With iMsg
Set .Configuration = iConf
.To = trim(request.form("tEmail"))
.From = Mail_From
.Subject = "Some subject"
.HTMLBody = "Your message body"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
end function
%>
__________________
Wind is your friend
Matt
Reply With Quote
The Following User Says Thank You to mat41 For This Useful Post:
futurehype (November 9th, 2009)