Использование Proxy при отправке почты через vb.net
Код:
Код:
Imports System.Net
Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim sSender As String = "***@mail.ru"
Dim sSendTo As String = "****@yandex.ru"
Dim sSubject As String = "Отчет об ошибке"
Dim sBody As String = TextBox1.Text
Dim Msg As New MailMessage(sSender, sSendTo, sSubject, sBody)
Msg.IsBodyHtml = True
Dim mc As New SmtpClient("smtp.mail.ru")
mc.Credentials = New NetworkCredential("***@mail.ru", "пароль")
mc.EnableSsl = True
mc.Send(Msg)
End Sub
End Class
Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim sSender As String = "***@mail.ru"
Dim sSendTo As String = "****@yandex.ru"
Dim sSubject As String = "Отчет об ошибке"
Dim sBody As String = TextBox1.Text
Dim Msg As New MailMessage(sSender, sSendTo, sSubject, sBody)
Msg.IsBodyHtml = True
Dim mc As New SmtpClient("smtp.mail.ru")
mc.Credentials = New NetworkCredential("***@mail.ru", "пароль")
mc.EnableSsl = True
mc.Send(Msg)
End Sub
End Class