Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.04 KB

README.md

File metadata and controls

25 lines (18 loc) · 1.04 KB

Email Sender

AppVeyor: Build status

Travis: Build status

An email sender library for DNXCORE50 / DNX451

For DI:

services.AddSmtpEmailSender(server, port, senderName, email, username, password, ssl);
...
var mail = services.GetRequiredService<IEMailSender>();
mail.SendEmailAsync("[email protected]","Title", "<html><head><meta http-equiv=\"Content-type\" content=\"text/html;charset=utf-8\"/></head><body>Html</body></html>").Wait();

For Common:

using CodeComb.Net.EmailSender;
...
var mail = new SmtpEmailSender("smtp.qq.com", 25, "Code Comb", "[email protected]", "YourQQNumber", "YourPassword");
mail.SendEmailAsync("[email protected]","关于MailSender项目说明", "<html><head><meta http-equiv=\"Content-type\" content=\"text/html;charset=utf-8\"/></head><body>能收到邮件吗</body></html>").Wait();