问题
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