开发者

Sending Mails from Oulook to Other accounts

How to send the email through mine company email id

Like every company use to give some email id to its associates like xyz@abc.com

How to send the mails through this id to other accou开发者_JS百科nts. Also I don't have passwords for this id, then how to send the email in this situation.


You could use the SmtpClient class. Other than the from and to addresses you will need your company's SMTP server:

var message = new MailMessage();
message.To.Add("to@abc.com");
message.Subject = "This is the Subject";
message.From = new MailAddress("from@abc.com");
message.Body = "body of the mail";
using (var smtpClient = new SmtpClient("smtp.abc.com"))
{
    smtpClient.Send(message);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜