RE: madar e-mail
Mira este fragmento de código con su respectivo comentario. Tienes que incluir una referencia a System.Web.Mail e importarlo donde pongas este código.
Dim mailMsg As New MailMessage()
With mailMsg
.From = txtFrom.Trim
.To = txtTo.Trim
.Cc = txtCC.Trim
.Bcc = txtBCC.Trim
.Subject = txtSubject.Trim
.Body = txtBady
.Priority = MailPriority.Normal
If Not IsNothing(arlAttachments) Then
Dim mailAttachment As Object
For Each mailAttachment In arlAttachments
.Attachments.Add(mailAttachment)
Next
End If
End With
Set the SmtpServer name. This can be any of the following depending on
your local security settings:
a) Local IP Address (assuming your local machines SMTP server has the
right to send messages through a local firewall (if present).
b) 127.0.0.1 the loopback of the local machine.
c) "smarthost" or the name or the IP address of the exchange server you
utilize for messaging. This is usually what is needed if you are behind
a corporate firewall.
See the Readme file for more information.
SmtpMail.SmtpServer = "smarthost"
Use structured error handling to attempt to send the email message and
provide feedback to the user about the success or failure of their
attempt.
SmtpMail.Send(mailMsg)