I am using DotNetOpenMail for sending mail. I can't able send mail to multiple people.
Pls guide me how to do it and send some example code for how to add Bcc, Cc
With thanks,
Md.Ali
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If txt_mailto.Text <> "" Then
For Each Mail In txt_mailto.Text.Split(delim)
emailsTo.Add(New EmailAddress(Mail))
Next
smg.ToAddresses.AddCollection(emailsTo)
End If
If txt_CCs.Text <> "" Then
For Each Mail In txt_CCs.Text.Split(delim)
emailsCC.Add(New EmailAddress(Mail))
Next
smg.BccAddresses.AddCollection(emailsCC)
End If
You can try :
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am using DotNetOpenMail for sending mail. I can't able send mail to multiple people.
Pls guide me how to do it and send some example code for how to add Bcc, Cc
With thanks,
Md.Ali
This is the code :
Dim delim As Char = CChar(",")
If txt_mailto.Text <> "" Then
For Each Mail In txt_mailto.Text.Split(delim)
emailsTo.Add(New EmailAddress(Mail))
Next
smg.ToAddresses.AddCollection(emailsTo)
End If
If txt_CCs.Text <> "" Then
For Each Mail In txt_CCs.Text.Split(delim)
emailsCC.Add(New EmailAddress(Mail))
Next
smg.BccAddresses.AddCollection(emailsCC)
End If
You can try :