Somebody know ́s, how can i get to sent a mail from Exchange unsing VB.net…
Hi Cesar.
Are you asking about Visual Basic? You can use the normal mailto command. As long as your Exchange account is setup in eM Client, and you have eM Client as the default for mailto, it should work. Subject and body tags work the same as with any other email client.
Hi Gary.
yes i ́m asking about Visual Basic and i’m using SmtpClient library and it’s working, thank for you answer.
this is my code :
Dim client As SmtpClient = New SmtpClient(“MYLOCALSERVER”)
Dim msg As New MailMessage()
Dim mailadd As New MailAddress(Environment.UserName & “@MYLOCALDOMAIN.MSFT”)
msg.From = mailadd
msg.To.Add(“[email protected]”)
msg.To.Add(“[email protected]”)
msg.To.Add(“[email protected]”)
msg.To.Add(“[email protected]”)
msg.Subject = “SUBJECT”
msg.Body = “HELLO ANY EVERYBODY”
msg.Attachments.Add(New Attachment(“C:\MATNOACT\MATNOACT.TXT”))
client.UseDefaultCredentials = True
client.Send(msg)