Click here to Skip to main content
15,909,896 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Possible to pass a string to a Function as name of an array? [modified] Pin
Hurricane30009-Sep-09 7:30
Hurricane30009-Sep-09 7:30 
GeneralRe: Possible to pass a string to a Function as name of an array? Pin
EliottA9-Sep-09 8:52
EliottA9-Sep-09 8:52 
AnswerRe: Possible to pass a string to a Function as name of an array? Pin
Christian Graus9-Sep-09 9:28
protectorChristian Graus9-Sep-09 9:28 
GeneralRe: Possible to pass a string to a Function as name of an array? Pin
Hurricane30009-Sep-09 11:03
Hurricane30009-Sep-09 11:03 
GeneralRe: Possible to pass a string to a Function as name of an array? Pin
Christian Graus9-Sep-09 11:20
protectorChristian Graus9-Sep-09 11:20 
GeneralRe: Possible to pass a string to a Function as name of an array? Pin
Hurricane300010-Sep-09 4:27
Hurricane300010-Sep-09 4:27 
AnswerRe: [Solved] Possible to pass a string to a Function as name of an array? Pin
Hurricane300010-Sep-09 6:28
Hurricane300010-Sep-09 6:28 
Questionsending Email Attachments Pin
Bob Beaubien9-Sep-09 4:30
Bob Beaubien9-Sep-09 4:30 
Hello All I am having a hard time sending some email attcahments i looked all over google and youtube and i this ways of doing it and thay dont work for me i click the button and it just sits thare and do noting i take out the attachment line and it sends me a email no problem
can any one help
Thanks


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim MyMailMessage As New MailMessage
        Try
            MyMailMessage.From = New MailAddress("FromEmail@gmail.com", "To Display Name")
            MyMailMessage.To.Add("ToEmail@hotmail.com")
            MyMailMessage.Subject = ("Status for " & TextBox1.Text)
            MyMailMessage.Body = ("System status for " & TextBox1.Text & " save and open with Excel")
            MyMailMessage.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("FromEmail@Gmail.com", "Password")
            SMTP.Send(MyMailMessage)
            MsgBox("msg sent")
        Catch ex As Exception


and i also tryed it like this i see now it is pretty much the same thing

Dim Data As New Attachment("c:\date.xls")
            MyMailMessage.Attachments.Add(Data)


Thanks in advnace every one
AnswerRe: sending Email Attachments [modified] Pin
Nuri Ismail9-Sep-09 5:32
Nuri Ismail9-Sep-09 5:32 
GeneralRe: sending Email Attachments Pin
Bob Beaubien9-Sep-09 9:20
Bob Beaubien9-Sep-09 9:20 
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 

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.