I'm need to create a small report to be send automaticliy from VB.NET Windows application. I have wrote below code which is workin on my private PC, and with Gmail settings, such as username + password + smtp.gmail.com, etc...
But with, my work informations, like my proxy ID + proxy password + company smptserver + port 25, does not working .
Do I missing some lines in my code:
Imports System.Net.Mail Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Mail As New MailMessage Mail.Subject = "test email" Mail.To.Add("emailaddress") Mail.From = New MailAddress("emailaddress") Mail.Body = TextBox1.Text Dim SMTP As New SmtpClient("smtpserver") SMTP.EnableSsl = True SMTP.Credentials = New System.Net.NetworkCredential("username", "password") SMTP.Port = 25 SMTP.Send(Mail) End Sub
Thank you in advance for help.