Click here to Skip to main content
15,895,142 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
AnswerRe: sending Email Attachments [modified] Pin
Nuri Ismail9-Sep-09 5:32
Nuri Ismail9-Sep-09 5:32 
I'm using something like the code below and it works fine for me.

' Create the mail message
Dim mail As New MailMessage() 
  
' Set the addresses
mail.From = New MailAddress("FromEmail@gmail.com") 
mail.To.Add("ToEmail@hotmail.com") 

' Set the content
mail.Subject = "The subject..."
mail.Body = "The message body..."

' Add an attachment
mail.Attachments.Add(New Attachment("Path to attachment")) 

' Send the message
Dim smtp As New SmtpClient("smtp.gmail.com") 
smtp.Credentials = New System.Net.NetworkCredential("username", "password") 
smtp.EnableSsl = True

Try
  smtp.Send(mail)
Catch e As Exception
  ......
Finally
  mail.Dispose()
  smtp = Nothing
End Try


Regards
Nuri Ismail

modified on Wednesday, September 9, 2009 11:55 AM

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 
AnswerRe: Beginner Pin
Steven J Jowett9-Sep-09 3:18
Steven J Jowett9-Sep-09 3:18 

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.