используйте этот код для отправки почты с использованием учетной записи gmail
Public Sub sendmail(ByVal story As String, ByVal from As String, ByVal Too As String)
Dim mail As New System.Net.Mail.MailMessage()
mail.[To].Add([too])
mail.From = New MailAddress(from, "StoryPan", System.Text.Encoding.UTF8)
mail.Subject = "Your Friend with ID: " + Session("userlogin").ToString() + " Sending Story"
mail.SubjectEncoding = System.Text.Encoding.UTF8
mail.Body = "StoryPan:<br />" + story
mail.BodyEncoding = System.Text.Encoding.UTF8
mail.IsBodyHtml = True
mail.Priority = MailPriority.High
Dim client As New SmtpClient()
client.Credentials = New System.Net.NetworkCredential(from, "panstory")
client.Port = 587
client.Host = "smtp.gmail.com"
client.EnableSsl = True
Try
client.Send(mail)
ScriptManager.RegisterClientScriptBlock(Me.Page, Me.GetType, "HidePageAdd", "closeMainPopup()", True)
lblposted.Visible = True
lblposted.Text = "Email sent successfully."
Catch ex As Exception
lblemailerror.Visible = True
lblemailerror.Text = "Send Email Failed"
End Try
End Sub