Our SMTP Server requires authentication before you can send email, but If your ASP or ASP.net script is located on our Web Server, you don't need any SMTP Authentication to send email.
Below is the code examples
using System.Web.Mail;
private void SendEmail(String from,String to,String body,String subject)
{
MailMessage m = new MailMessage();
m.To = to;
m.From = from;
m.Body = body;
m.Subject = subject;
SmtpMail.SmtpServer = "mail.yourdomain.com";
SmtpMail.Send(m);
}
- 7 Los Usuarios han Encontrado Esto Útil