Thu Nov 06, 2008 3:15 pm
Dim MailMsg As New System.Web.Mail.MailMessage
Dim mServer As System.Web.Mail.SmtpMail
MailMsg.Subject = "Message Subject"
MailMsg.Body = "Message Body."
MailMsg.From = "fromaddress@... <mailto:fromaddress@...>
"
MailMsg.BodyFormat = Web.Mail.MailFormat.Html
mServer.SmtpServer = "smtpserver.com"
For i = 0 To lstEmails.Items.Count - 1
lstEmails.SelectedIndex = i
MailMsg.To = lstEmails.SelectedValue
mServer.Send(MailMsg)
Next
Thu Nov 06, 2008 3:16 pm
Dim ErrLog As String
Dim MailMsg As New System.Web.Mail.MailMessage
Dim mServer As System.Web.Mail.SmtpMail
With MailMsg
.Subject = "Message Subject"
.Body = "Message Body."
.From = "fromaddress@..."
.BodyFormat = Web.Mail.MailFormat.Html
mServer.SmtpServer = "smtpserver.com"
For i = 0 To lstEmails.Items.Count - 1
lstEmails.SelectedIndex = i
.To = lstEmails.SelectedValue
Try
mServer.Send(MailMsg)
Catch EX As Exception
ErrLog = ErrLog & EX.message & "; "
End Try
Next
End with
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.