Trouble using SendGrid with appharbor

懵懂的女人 提交于 2019-12-10 21:03:11

问题


I am using appharbor, added SendGrid as addon, They provided me smtp host - smtp.sendgrid.com port - 587 user - 32adf793-2cbf-492c-9bb9-****@apphb.com

When I use these details and try to send email via my c# code, it says, "Failure Sending Email". Please help.


回答1:


AppHarbor injects the relevant SMTP configuration in your application's configuration and you can send emails right off the bat using this snippet:

var smtpClient = new SmtpClient();
smtpClient.Send(new MailMessage(...));

There are additional details here.



来源:https://stackoverflow.com/questions/8968518/trouble-using-sendgrid-with-appharbor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!