hi,
I use this code for email message in vb.net but I got this error
The transport failed to connect to the server. How to solve
Dim EmailTo As String 'Emailaddres for user to send
Dim EmailFrom As String 'Emailaddres for user from
Dim MailSubject As String 'Subject of Mail
Dim MessageBody As String 'Message
Dim ServerName As String 'Server Name - important
ServerName = "spiro47"
'Similarly, add in EmailTo, EmailFrom etc parameters here
EmailTo = "sekar.mca2009@gmail.com"
EmailFrom = "raja.mca2010@yahoo.com"
MailSubject = "welcome"
MessageBody = "hi"
'Set the SMTP Server's address
SmtpMail.SmtpServer = ServerName
Try
SmtpMail.Send(EmailFrom, EmailTo, MailSubject, MessageBody)
Catch ex As Exception
MsgBox("Delivery Failure: " & ex.Source & ex.Message)
End Try
regads
sekar.c
Regards
Sekar.c