Hi,
I am using smtp to send mail.
Wish to understand more how actually the smtp server work.
I use the below code to send mail without specifying the smtp server name and it works perfectly find.
It will auto detect my smtp server i presume....
public void sendMail(string xTo,string xCC,string xBCC,string xSubject,MailPriority xPriority,string xBody)
{
MailMessage xMailMessage = new MailMessage();
xMailMessage.From = xFrom;
xMailMessage.To = xTo;
xMailMessage.Cc = xCC;
xMailMessage.Bcc = xBCC;
xMailMessage.Subject = xSubject;
xMailMessage.Priority = xPriority;
xMailMessage.Body = xBody;
SmtpMail.Send(xMailMessage);
}
Then when i bring all my code to my home, surprisingly it able to send mail also using my application.
Now i wonder if the smtp is using my isp smtp server?
if anyone have better idea on how the SmtpMail work, please contribute as i wish to know more about how it actually work.
Thanks!
regards,
weihann.
I am using smtp to send mail.
Wish to understand more how actually the smtp server work.
I use the below code to send mail without specifying the smtp server name and it works perfectly find.
It will auto detect my smtp server i presume....
public void sendMail(string xTo,string xCC,string xBCC,string xSubject,MailPriority xPriority,string xBody)
{
MailMessage xMailMessage = new MailMessage();
xMailMessage.From = xFrom;
xMailMessage.To = xTo;
xMailMessage.Cc = xCC;
xMailMessage.Bcc = xBCC;
xMailMessage.Subject = xSubject;
xMailMessage.Priority = xPriority;
xMailMessage.Body = xBody;
SmtpMail.Send(xMailMessage);
}
Then when i bring all my code to my home, surprisingly it able to send mail also using my application.
Now i wonder if the smtp is using my isp smtp server?
if anyone have better idea on how the SmtpMail work, please contribute as i wish to know more about how it actually work.
Thanks!
regards,
weihann.