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

Which Mail object to use?

Status
Not open for further replies.

baden

Programmer
Feb 6, 2002
125
US
From other's experiences, I would like to know what would be the better one to use for sending html content.

Let's say you create an email to send (online) using a rich HTML editor. If you have a file system setup and include an image file from the server in the content - this is emailed with the content, using one of the following, correct??

Recommendations please, re:

CDONTS, ASPQMail, ASPMail, SMTPmail, Dundas - ASPMailer,
Persits - ASPEmail, ASP Smart - aspSmartMail
 
I use CDO mostly because I have the code written. Also CDONTS won't work on newer versions of IIS. I am not as familiar with the other objects but I do know that CDO has a method just for sending HTML content emails.

For example:

'Sample code used found@ '-----------------------------------------------------------------
Const cdoSendUsingMethod = "Const cdoSendUsingPort = 2
Const cdoSMTPServer = "Const cdoSMTPServerPort ="Const cdoSMTPConnectionTimeout = "Const cdoSMTPAuthenticate = "Const cdoBasic = 1
Const cdoSendUserName = "Const cdoSendPassword = "
set Fields = m_objCDOcon.Fields

'Setting up Message parameters
with Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
'Replace with your SMTP server
.Item(cdoSMTPServer) = "smtp.mail.com"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
'Only used if SMTP server requires Authentication
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "Username"
.Item(cdoSendPassword) = "Password"
.Update
end with

'Passing parameters to message object
Set m_objCDO.Configuration = m_objCDOcon

With m_objCDO
'Replace with email you wish the message to be sent to
.To = "email@email.net"
'Replace with email you wish the message to be from
.From = "Do@Not.Respond.net"
'Replace with subject
.Subject = "Subject Line"
'Replace with information you want to be sent
.HTMLBody = "HTML Body Here"
.Send
End With

As you can see I use the HTMLBody tag there. I know this code works and is also found on the Microsoft website.

Hope that helps.

Cassidy
 
It depends who you are sending it through, if your ISP uses IIS then yes use CDO or CDONT(older), i have also used the Dundas products, they are faily good too. Just depends, some are easy to mess with AND support HTML messages.
 
I use persits with aspemail and sending html email is not a problem. You just have to set a property to true (IsHTML). I have no complaints with it.
 
I am using Dundas since the server does not support MS CDONT. Dundas is working fine.

Frank
 
You cant rely on CDONTS mail object. Sometimes all the mails colelcted in the mailroot/Queue folder and after soem time all the mails get fired at the same time. I have exprience often these kind of problems.Would advise you to go either for aspmail or Jmail.

Sugarthan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top