How to send email to several recipients?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cpanelxp
    New Member
    • Jan 2011
    • 6

    How to send email to several recipients?

    hi,
    I have programmed a software that can send email to one recipient with this code
    In General Declaration I used this code

    Code:
    Imports System.Net.Mail
    In Form Declaration I used this code


    Code:
    Public Class Form1
        Public D As MailMessage = New MailMessage
        Public mail As New System.Net.Mail.SmtpClient("smtp.live.com")
        Public myEmailAddress As String
        Public myPassword As String
    under Button1_Click I used this code
    Code:
    Dim usernamepassword As New Net.NetworkCredential(Me.TextBox1.Text, Me.TextBox2.Text)
                        Dim mailmsg As New MailMessage(Me.TextBox1.Text, Me.TextBox3.Text, Me.TextBox4.Text, Me.TextBox5.Text)
                        mail.Port = "25"
                        mail.Host = "smtp.live.com"
                        mail.EnableSsl = True
                        mail.Credentials = usernamepassword
    
                        mail.Send(Me.TextBox1.Text, Me.TextBox3.Text, Me.TextBox4.Text, Me.TextBox5.Text)
                        MessageBox.Show("Email sended succesfull.")
    how can I send email to SEVERAL recipients?
  • Oralloy
    Recognized Expert Contributor
    • Jun 2010
    • 988

    #2
    You might try a list of addresses separated by commas (",") or semicolons (";").

    What does it say in the documentation?

    Comment

    • cpanelxp
      New Member
      • Jan 2011
      • 6

      #3
      ok I'll send you the whole project
      to see where's the error

      click here

      Comment

      • cpanelxp
        New Member
        • Jan 2011
        • 6

        #4
        click here to downlaod

        Comment

        • Oralloy
          Recognized Expert Contributor
          • Jun 2010
          • 988

          #5
          cpanel,

          Sorry for the long delay. I work four days a week, so I'm usually off on Fridays.

          Can you please attach the file as a .ZIP. The problem being that I don't have WinRAR, and I'll have to ask I.T. to install it on my system.

          Comment

          Working...