开发者

how to send email via smartermail?

What is smarterm开发者_如何学编程ail? How can i send mail via smartermail installed on server? Any smtp settings in web.config?


SmarterMail is an SMTP mail server, so you could use the SmtpClient class to send mail:

var client = new SmtpClient("hostnameOfYourSmtpServer");
var from = new MailAddress("from@example.com");
var to = new MailAddress("to@example.com");
var message = new MailMessage(from, to);
message.Subject = "test subject";
message.Body = "This is a test e-mail message sent by an application. ";
client.Send(message);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜