Last post Apr 16, 2016 12:57 AM by mbanavige
Apr 09, 2016 08:36 AM|MTrush|LINK
I have developed web application with one web form for sending password through mail with one text box for entering the users email id and one button to send mail to user's id. . I have achieved this through SMTP, but this will not worked after deployed
the application on Microsoft Azure. I want to send mail through SendGrid.
Please do needful.
Thanks & Regards
Apr 09, 2016 10:48 AM|mbanavige|LINK
I want to send mail through SendGrid
have you followed the instructions in this tutorial: https://azure.microsoft.com/en-us/documentation/articles/sendgrid-dotnet-how-to-send-email/
Apr 11, 2016 12:38 PM|MTrush|LINK
I have followed this steps which is given in the link, but it is not working. I am not able to send the mail.
Apr 13, 2016 06:49 PM|wavemaster|LINK
We can speculate about all possibilities, but you could narrow things down by showing your code.
Apr 14, 2016 04:23 AM|MTrush|LINK
Below is my application code for sending mail through sendgrid. Please do needful.
public partial class _Default : Page
protected void Page_Load(object sender, EventArgs e)
protected void Button1_Click(object sender, EventArgs e)
// Create the email object first, then add the properties.
var myMessage = new SendGridMessage();
// Add the message properties.
myMessage.From = new MailAddress("firstname.lastname@example.org");
// Add multiple addresses to the To field.
myMessage.Subject = "Password Recovery";
//Add the HTML and Text bodies
myMessage.Html = "<p>Hello Sir/Madam</p>";
myMessage.Text = "Your Password is";
// Create network credentials to access your SendGrid account
var username = "email@example.com";
var pswd = "f9H3sHa7oQvrhXV";
//var username = System.Environment.GetEnvironmentVariable("SENDGRID_USER");
//var pswd = System.Environment.GetEnvironmentVariable("SENDGRID_PASS");
//var apiKey = System.Environment.GetEnvironmentVariable("SENDGRID_APIKEY");
var credentials = new NetworkCredential(username, pswd);
// Create an Web transport for sending email.
var transportWeb = new Web(credentials);
Apr 16, 2016 12:57 AM|mbanavige|LINK
after you set it all up, don't forget to send the mail message:
// Send the email, which returns an awaitable task.