// Initialize WebMail helper
WebMail.SmtpServer = "your-SMTP-host";????
WebMail.SmtpPort = 25;????
WebMail.UserName = "your-user-name-here";????
WebMail.Password = "your-account-password";???
WebMail.From = "your-email-address-here";????
? Add a new page named ProcessRequest.cshtml to the website and add the following code and markup:
@{
var customerName = Request["customerName"];
var customerEmail = Request["customerEmail"];
var customerRequest = Request["customerRequest"];
var errorMessage = "";
var debuggingFlag = false;
try {
// Initialize WebMail helper
WebMail.SmtpServer = "your-SMTP-host";
WebMail.SmtpPort = 25;
WebMail.UserName = "your-user-name-here";
WebMail.Password = "your-account-password";
WebMail.From = "your-email-address-here";
// Send email
WebMail.Send(to: customerEmail,
subject: "Help request from - " + customerName,
body: customerRequest
);
}
catch (Exception ex ) {
errorMessage = ex.Message;
}
}
Sorry to hear that you are having trouble, @customerName.
@if(errorMessage == ""){
An email message has been sent to our customer service
department regarding the following problem:
@customerRequest
}
else{
The email was not sent.
Please check that the code in the ProcessRequest page has
correct settings for the SMTP server name, a user name,
a password, and a "from" address.
if(debuggingFlag){
The following error was reported:
@errorMessage
}
}

Nitin SontakkePosted Nov 15, 2016, 3:51 AM
Manimekalai GanesanPosted Nov 15, 2016, 3:40 AM
Ananth GPosted Oct 21, 2016, 5:39 AM
Rajeesh MenothPosted Aug 10, 2016, 5:19 AM
Bikesh SrivastavaPosted Aug 10, 2016, 5:13 AM
Vinay SinghPosted Aug 10, 2016, 4:39 AM
Nitin SontakkePosted Aug 10, 2016, 2:27 AM