Re: Send Mail using CDO object in vb.net

  • Thread starter Thread starter jayakumar
  • Start date Start date
J

jayakumar

cdoMail.MimeFormatted = True
cdoMail.CC = strCCmail
cdoMail.Subject = strsubject
cdoMail.From = strFromEmail
cdoMail.HTMLBody = strBody
cdoMail.Send()
' Set the configuration for Network Send
Flds(cdoSendUsingMethod) = cdoSendUsingPort

Flds(cdoSMTPAuthenticate) = cdoBasic

Flds(cdoSMTPServer) = SMTP_SERVER_NAME
Flds(cdoSMTPServerPort) = SMTP_PORT

Flds(cdoSendUserName) = SMTP_USER_NAME
Flds(cdoSendPassword) = SMTP_PASSWORD
Flds.Update
 
How about using the System.Web.Mail namespace?

You need to Add a reference to System.Web in your project (unless it's a web
project)

Then...

Imports System.Web.Mail
..
..
..
Dim mmEmail As New MailMessage()

With mmEmail
.CC = strCCmail
.Subject = strSubject
.From = strFromEmail
.BodyFormat = MailFormat.Html
.Body = strBody
End With

SmtpMail.SmtpServer = SMTP_SERVER_NAME
SmtpMail.Send(mmEmail)

--
Happy to help,
-- Tom Spink
([email protected])

"Go down with your server"

http://dotnetx.betasafe.com >> On The Mend

Please respond to the newsgroup,
so all can benefit
 
Thanks Tom,

But my smtp server require authentication, can u tell
how do i set the username password so that i can use
system.web.mail.

thanks
 
Back
Top