F
Frank
I am attempting to develop a solution where I handle bounced e-mails.
I wish to field all bounced emails in a custom email account such a
(e-mail address removed)
From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
could use:
mail.Headers.Add( "Reply-To", "(e-mail address removed)" );
When I test this from a test web app, I don't seem to field a bounced email
response for some reason. Any suggestions? My code follows:
private void Button1_Click(object sender, System.EventArgs e)
{
Send_Email([email protected]); //this is a spammers address that
gets bounced
}
private void Send_Email(string email)
{
string mailTo = "(e-mail address removed), (e-mail address removed)";
MailMessage mail = new MailMessage();
mail.To = email;
mail.Bcc = mailTo;
mail.From = "(e-mail address removed) ";
mail.Headers.Add("Reply-To", "(e-mail address removed)");
mail.Subject = "Company Affiliate Program";
mail.Body = "Dear Melissa,\n\n";
mail.Body += "This email is in response to you signing up in our affiliate
program." + "\n"+ "\n";
mail.Body += "If you did not sign up for our program, please call customer
service at 800.822.7752" + "\n"+ "\n" ;
mail.Body += "Below is your username and password" + "\n"+ "\n";
mail.Body += "Username: " + email + "\n";
mail.Body += "Password: nerds\n\n";
mail.Body += "Please hold on to this information for future use." + "\n\n";
mail.Body += "You may log in at http://www.url.com/affiliate/" + "\n";
mail.Body += "and access a webpage where you may copy and paste a company
banner and HTML code" + "\n";
mail.Body += "that you should paste into you own webpage. " + "\n\n";
mail.Body += "The banner will re-direct your clients to our website via a
URL ";
mail.Body += "that will credit you, the affiliate, with sending that client
to our site." + "\n";
mail.Body += "This will ensure you receive appropriate finacial credit for
your support to our endeavors" + "\n" + "\n";
mail.Body += "Should you have any trouble, feel free to call us at
800.888.8888" + "\n" + "\n";
mail.Body += "Thank You" + "\n";
mail.Body += "MarketZAR";
mail.BodyFormat = MailFormat.Text;
mail.Priority = MailPriority.Normal;
SmtpMail.SmtpServer = "server";
SmtpMail.Send(mail);
}
I wish to field all bounced emails in a custom email account such a
(e-mail address removed)
From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
could use:
mail.Headers.Add( "Reply-To", "(e-mail address removed)" );
When I test this from a test web app, I don't seem to field a bounced email
response for some reason. Any suggestions? My code follows:
private void Button1_Click(object sender, System.EventArgs e)
{
Send_Email([email protected]); //this is a spammers address that
gets bounced
}
private void Send_Email(string email)
{
string mailTo = "(e-mail address removed), (e-mail address removed)";
MailMessage mail = new MailMessage();
mail.To = email;
mail.Bcc = mailTo;
mail.From = "(e-mail address removed) ";
mail.Headers.Add("Reply-To", "(e-mail address removed)");
mail.Subject = "Company Affiliate Program";
mail.Body = "Dear Melissa,\n\n";
mail.Body += "This email is in response to you signing up in our affiliate
program." + "\n"+ "\n";
mail.Body += "If you did not sign up for our program, please call customer
service at 800.822.7752" + "\n"+ "\n" ;
mail.Body += "Below is your username and password" + "\n"+ "\n";
mail.Body += "Username: " + email + "\n";
mail.Body += "Password: nerds\n\n";
mail.Body += "Please hold on to this information for future use." + "\n\n";
mail.Body += "You may log in at http://www.url.com/affiliate/" + "\n";
mail.Body += "and access a webpage where you may copy and paste a company
banner and HTML code" + "\n";
mail.Body += "that you should paste into you own webpage. " + "\n\n";
mail.Body += "The banner will re-direct your clients to our website via a
URL ";
mail.Body += "that will credit you, the affiliate, with sending that client
to our site." + "\n";
mail.Body += "This will ensure you receive appropriate finacial credit for
your support to our endeavors" + "\n" + "\n";
mail.Body += "Should you have any trouble, feel free to call us at
800.888.8888" + "\n" + "\n";
mail.Body += "Thank You" + "\n";
mail.Body += "MarketZAR";
mail.BodyFormat = MailFormat.Text;
mail.Priority = MailPriority.Normal;
SmtpMail.SmtpServer = "server";
SmtpMail.Send(mail);
}