How can I send an Email with VB.2008, is the SMTP server needs autentication???
I can do it without autentication, mas with that, it doesnt work
Printable View
How can I send an Email with VB.2008, is the SMTP server needs autentication???
I can do it without autentication, mas with that, it doesnt work
post code and we will give you some help
I use this code:
The question is:Code:Dim EmailServer As New System.Net.Mail.SmtpClient("smtp.gmail.com")
Dim myMessage As New System.Net.Mail.MailMessage("[email protected]", "[email protected]", "Subject", "Main msg")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
EmailServer.Send(myMessage)
MsgBox("ok")
End Sub
The server SMTP I wanna use need SMTP autentication,
I can I give them?
Thank You
Code:Dim credentials As New Net.NetworkCredential("username", "password")
EmailServer.Credentials = credentials