Imports System.Net
Imports System.Net.Mail
Private mpMessage As MailMessage = Nothing
Private mpSMTPSvr As SmtpClient = Nothing
'------------------------------------------------------------------------
'-> Send The Message
'------------------------------------------------------------------------
MailerHost = "Addrss-of-your-emailer-host-server"
mpMessage = New System.Net.Mail.MailMessage()
mpMessage.Body = "Message body text goes here"
If Trim(SenderNameValue) <> "" Then
mpMessage.From = New System.Net.Mail.MailAddress("[email protected]", SenderNameValue)
mpMessage.Sender = New System.Net.Mail.MailAddress("[email protected]", SenderNameValue)
Else
mpMessage.From = New System.Net.Mail.MailAddress("[email protected]", "Name_Unspecified")
mpMessage.Sender = New System.Net.Mail.MailAddress("[email protected]", "Name_Unspecified")
End If
mpMessage.Priority = System.Net.Mail.MailPriority.High
mpMessage.Subject = "[WEB-REPONSE] - Correspondence via Website response form."
mpMessage.To.Add(Trim("[email protected]"))
mpMessage.CC.Add(Trim("[email protected]"))
mpMessage.BCC.Add(Trim("[email protected]"))
Try
mpSMTPSvr.Send(mpMessage)
SendStandardCommunicae = True
Catch ex As Net.Mail.SmtpException
ReturnErrorid = eEML_NETWORKERRORSENDINGEMAIL
ReturnErrorText = "A network error occurred whilst trying to send your message, please check your details for syntax errors and try again later.<br />If the error occurs consistently please contact the site administrator or use an alternative method of contact.<br /><br />"
ReturnErrorText = ReturnErrorText & "Extra Information:" & ex.Message
End Try
solved Visual Basic email system bcc mails [closed]