Download how send an email with multiple attachments in VB 2008 video

Download how send an email with multiple attachments in VB 2008 video on savevid.com

Download how send an email with multiple attachments in VB 2008 streaming video in flv, mp4, avi formats direct easily on Savevid.com.

 

how send an email with multiple attachments in VB 2008

  • To download Youtube videos you should click "Run" when java window opens. Enable "Always trust content from the publisher" to download seamlessly in the future.
  • Download video
  • Provider: Link: http://www.youtube.com/watch?v=IjduKK1nJkI
  • Rate: Please rate this video Views: 13 Downloads: 8
  • Description: request video for driftkinguk26 on how to send multiple attachments with emails
    declarations:
    Imports System.Net.Mail
    Public Class Form1
    Dim file(2) As String

    select attachments code:
    file = Nothing
    OpenFileDialog1.ShowDialog()
    file = OpenFileDialog1.FileNames

    TextBox7.Text = file(0)
    Try
    TextBox8.Text = file(1)
    Catch ex As IndexOutOfRangeException
    End Try
    Try
    TextBox9.Text = file(2)
    Catch ex As IndexOutOfRangeException
    End Try

    send email code:
    Dim smtpserver As New SmtpClient()
    Dim mail As New MailMessage()
    smtpserver.Credentials = New Net.NetworkCredential(TextBox1.Text, TextBox2.Text)
    smtpserver.Host = TextBox3.Text
    smtpserver.Port = TextBox4.Text
    mail = New MailMessage
    mail.From = New MailAddress(TextBox1.Text)
    mail.To.Add(TextBox5.Text)
    mail.Subject = TextBox6.Text
    mail.Body = TextBox10.Text

    If Not TextBox7.Text = Nothing Then
    Dim attach As New Attachment(TextBox7.Text)
    mail.Attachments.Add(attach)
    End If
    If Not TextBox8.Text = Nothing Then
    Dim attach As New Attachment(TextBox8.Text)
    mail.Attachments.Add(attach)
    End If
    If Not TextBox9.Text = Nothing Then
    Dim attach As New Attachment(TextBox9.Text)
    mail.Attachments.Add(attach)
    End If

    smtpserver.EnableSsl = True
    Try
    smtpserver.Send(mail)
    Catch ex As SmtpException
    MsgBox("either you typed something wrong or something is wrong with the program...most likely it was something you typed so try again")
    End Try
  • Tags: , , , , , , , , , , , , , , , , , ,
  • Category: Flag video How-To, Celebrity Videos