Click here to Skip to main content
15,910,358 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: sending Email Attachments Pin
Bob Beaubien9-Sep-09 9:20
Bob Beaubien9-Sep-09 9:20 
Still not working for me i take the attatchem line out and it send the mail i put it back then i get noting

This is what i put
Thanks Agine

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Mail As New MailMessage()

        Mail.From = New MailAddress("FromMail@gmail.com", "Display Name")
        Mail.To.Add("ToMail@hotmail.com")
        Mail.Subject = "Status for " & TextBox1.Text
        Mail.Body = "System status for " & TextBox1.Text & " save and open with Excel"


        Mail.Attachments.Add(New Attachment("C:\Data.xls"))

        Dim SMTP As New SmtpClient("smtp.gmail.com")
        SMTP.Port = 587
        SMTP.EnableSsl = True
        SMTP.Credentials = New System.Net.NetworkCredential("FromMail@Gmail.com", "Password")

        Try
            SMTP.Send(Mail)
        Catch ex As Exception

        Finally
            Mail.Dispose()
            SMTP = Nothing

        End Try
    End Sub

GeneralRe: sending Email Attachments Pin
Nuri Ismail9-Sep-09 10:32
Nuri Ismail9-Sep-09 10:32 
GeneralRe: sending Email Attachments Pin
Bob Beaubien9-Sep-09 10:56
Bob Beaubien9-Sep-09 10:56 
GeneralRe: sending Email Attachments Pin
Bob Beaubien9-Sep-09 18:45
Bob Beaubien9-Sep-09 18:45 
QuestionReading bits in VB.net Pin
xx77abs9-Sep-09 4:06
xx77abs9-Sep-09 4:06 
AnswerRe: Reading bits in VB.net Pin
EliottA9-Sep-09 4:13
EliottA9-Sep-09 4:13 
GeneralRe: Reading bits in VB.net Pin
xx77abs9-Sep-09 4:17
xx77abs9-Sep-09 4:17 
QuestionGet username of a PC [SOLVED] Pin
vijay24829-Sep-09 3:37
vijay24829-Sep-09 3:37 
AnswerRe: Get username of a PC Pin
Nuri Ismail9-Sep-09 4:01
Nuri Ismail9-Sep-09 4:01 
GeneralRe: Get username of a PC Pin
vijay24829-Sep-09 4:17
vijay24829-Sep-09 4:17 
AnswerRe: Get username of a PC [About the second query] Pin
Nuri Ismail9-Sep-09 4:14
Nuri Ismail9-Sep-09 4:14 
GeneralRe: Get username of a PC [About the second query] Pin
vijay24829-Sep-09 4:20
vijay24829-Sep-09 4:20 
GeneralRe: Get username of a PC [About the second query] Pin
Nuri Ismail9-Sep-09 5:04
Nuri Ismail9-Sep-09 5:04 
GeneralRe: Get username of a PC [About the second query] Pin
vijay24829-Sep-09 5:08
vijay24829-Sep-09 5:08 
QuestionBeginner Pin
PCS3059-Sep-09 3:08
PCS3059-Sep-09 3:08 
AnswerCheck out MSDN for learning VB development Pin
David Mujica9-Sep-09 3:16
David Mujica9-Sep-09 3:16 
AnswerRe: Beginner Pin
Steven J Jowett9-Sep-09 3:18
Steven J Jowett9-Sep-09 3:18 
GeneralRe: Beginner Pin
EliottA9-Sep-09 3:37
EliottA9-Sep-09 3:37 
GeneralRe: Beginner Pin
Steven J Jowett9-Sep-09 4:28
Steven J Jowett9-Sep-09 4:28 
GeneralRe: Beginner Pin
PCS30510-Sep-09 1:57
PCS30510-Sep-09 1:57 
Questionhow to create dynamic pie charts in vb.net Pin
vidhish8-Sep-09 21:37
vidhish8-Sep-09 21:37 
AnswerRe: how to create dynamic pie charts in vb.net Pin
Christian Graus8-Sep-09 22:26
protectorChristian Graus8-Sep-09 22:26 
AnswerRe: how to create dynamic pie charts in vb.net Pin
0x3c09-Sep-09 0:36
0x3c09-Sep-09 0:36 
Questionplz help me to join multiple table query.... Pin
roopali gupta8-Sep-09 20:33
roopali gupta8-Sep-09 20:33 
AnswerRe: plz help me to join multiple table query.... Pin
_Damian S_8-Sep-09 20:38
professional_Damian S_8-Sep-09 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.