J
Jackson_1990
Guest
Hi,
Regarding example like
string to = "jane@contoso.com";
string from = "ben@contoso.com";
string subject = "Using the new SMTP client.";
string body = @"Using this new feature, you can send an email message from an application very easily.";
MailMessage message = new MailMessage(from, to, subject, body);
SmtpClient client = new SmtpClient(server, port);
// Credentials are necessary if the server requires the client
// to authenticate before it will send email on the client's behalf.
client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.Send(message);
can I also pass details like account and password as client Credentials?
Many Thanks & Best Regards, Hua Min
Continue reading...
Regarding example like
string to = "jane@contoso.com";
string from = "ben@contoso.com";
string subject = "Using the new SMTP client.";
string body = @"Using this new feature, you can send an email message from an application very easily.";
MailMessage message = new MailMessage(from, to, subject, body);
SmtpClient client = new SmtpClient(server, port);
// Credentials are necessary if the server requires the client
// to authenticate before it will send email on the client's behalf.
client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.Send(message);
can I also pass details like account and password as client Credentials?
Many Thanks & Best Regards, Hua Min
Continue reading...