Menu

How to Send mail to multiple recipients

2008-05-19
2013-04-02
  • Mohamed Ali

    Mohamed Ali - 2008-05-19

    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

     
    • nguyen hien

      nguyen hien - 2008-06-20

      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 :

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.