473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Send Email with "Reply-To" Question

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
bo*****@mycompany.com

From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
could use:
mail.Headers.Add( "Reply-To", "al*************@mycompany.com" );

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(me***********@earthlink.net); //this is a spammers address that
gets bounced

}

private void Send_Email(string email)

{

string mailTo = "fk******@pfmail.com, gl**@glob.com";

MailMessage mail = new MailMessage();

mail.To = email;

mail.Bcc = mailTo;

mail.From = "in**@marketzar.com ";

mail.Headers.Add("Reply-To", "bo*****@mycompany.com");

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);

}
Aug 14 '06 #1
3 5391
Hi,

Did you tried to send an email from OE and see if you get it returned?

Maybe your ISP is tagging it as spam and is preventing it to reach your
inbox

Also note than in 2.0 you have a ReplyTo property you can use instead of
adding a header.

Finally consider using a StringBuilder to build your email or just a
multiline string

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Frank" <fk******@pfmail.comwrote in message
news:eh*************@TK2MSFTNGP03.phx.gbl...
>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
bo*****@mycompany.com

From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
could use:
mail.Headers.Add( "Reply-To", "al*************@mycompany.com" );

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(me***********@earthlink.net); //this is a spammers address that
gets bounced

}

private void Send_Email(string email)

{

string mailTo = "fk******@pfmail.com, gl**@glob.com";

MailMessage mail = new MailMessage();

mail.To = email;

mail.Bcc = mailTo;

mail.From = "in**@marketzar.com ";

mail.Headers.Add("Reply-To", "bo*****@mycompany.com");

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);

}


Aug 14 '06 #2
Yeah...I was using the 1.1 platform, but after reading your suggestions, I
decided to try it on the 2.0 platform, using the ReplyTo property.

That did the trick, but I am still perplexed why my original code didn't
work....maybe it does, and it just hasn't sent a response yet....it has only
been like 3 hours sice sending it.

Have any of you ever successfully used the
mailmessage.Headres.Add("return-path", my*****@company.com);?

If so, could you provide a sample?

Thanks is advance.


"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.uswrote
in message news:u5******************@TK2MSFTNGP05.phx.gbl...
Hi,

Did you tried to send an email from OE and see if you get it returned?

Maybe your ISP is tagging it as spam and is preventing it to reach your
inbox

Also note than in 2.0 you have a ReplyTo property you can use instead of
adding a header.

Finally consider using a StringBuilder to build your email or just a
multiline string

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Frank" <fk******@pfmail.comwrote in message
news:eh*************@TK2MSFTNGP03.phx.gbl...
>>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
bo*****@mycompany.com

From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
could use:
mail.Headers.Add( "Reply-To", "al*************@mycompany.com" );

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(me***********@earthlink.net); //this is a spammers address
that gets bounced

}

private void Send_Email(string email)

{

string mailTo = "fk******@pfmail.com, gl**@glob.com";

MailMessage mail = new MailMessage();

mail.To = email;

mail.Bcc = mailTo;

mail.From = "in**@marketzar.com ";

mail.Headers.Add("Reply-To", "bo*****@mycompany.com");

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);

}



Aug 14 '06 #3
Hi

I cannot be 100% sure but I think I used it before again cannot be sure.

just do as I told you , send the same email using OE and see if you get an
answer, sometimes my ISP mark as spam emails that are not and they are never
delivered.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Frank" <fk******@pfmail.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Yeah...I was using the 1.1 platform, but after reading your suggestions, I
decided to try it on the 2.0 platform, using the ReplyTo property.

That did the trick, but I am still perplexed why my original code didn't
work....maybe it does, and it just hasn't sent a response yet....it has
only been like 3 hours sice sending it.

Have any of you ever successfully used the
mailmessage.Headres.Add("return-path", my*****@company.com);?

If so, could you provide a sample?

Thanks is advance.


"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:u5******************@TK2MSFTNGP05.phx.gbl...
>Hi,

Did you tried to send an email from OE and see if you get it returned?

Maybe your ISP is tagging it as spam and is preventing it to reach your
inbox

Also note than in 2.0 you have a ReplyTo property you can use instead of
adding a header.

Finally consider using a StringBuilder to build your email or just a
multiline string

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Frank" <fk******@pfmail.comwrote in message
news:eh*************@TK2MSFTNGP03.phx.gbl...
>>>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
bo*****@mycompany.com

From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
could use:
mail.Headers.Add( "Reply-To", "al*************@mycompany.com" );

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(me***********@earthlink.net); //this is a spammers address
that gets bounced

}

private void Send_Email(string email)

{

string mailTo = "fk******@pfmail.com, gl**@glob.com";

MailMessage mail = new MailMessage();

mail.To = email;

mail.Bcc = mailTo;

mail.From = "in**@marketzar.com ";

mail.Headers.Add("Reply-To", "bo*****@mycompany.com");

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);

}




Aug 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Luc Dal | last post by:
Hello, I've serious problem using ASP under WindowsXP sp2. I get the following reply (sorry it's in french) Erreur de compilation Microsoft VBScript error '800a0401' Fin d'instruction...
3
by: Ptbrady | last post by:
"Order By" fails in form for linked table. -------------- My A2K database has worked well for several years, but now has been split into front-end/back-end and has the following problem. I have a...
7
by: Tom Chidwick | last post by:
Hello, I've custom-built a fairly extensive object model that is designed to run in the background and control the opening and closing of related forms. The whole thing kicks-off with an...
8
by: Eric Lilja | last post by:
As the title, says: Why doesn't the following program print Hi Charles<newline> when run? #include <stdarg.h> #include <stdio.h> static void va_arg_example(const char *format, ...) { va_list...
10
by: Eric G. Harrison | last post by:
We have a project with many other projects referenced (all of which are referenced at the project level and are included in the solution). Frequenly, if we make a change in project A (such as adding...
3
by: Bill Nguyen | last post by:
I'm looking for sample codes to send email & fax from a VB app. We have SMTP server setup. As to faxing, I'm looking for a reliable and affordable faxserver. ANy suggestion is greatly appreciated....
6
by: Sile | last post by:
Hello, I'm trying to get f2py working from the command line on windows XP. I have mingw32 as my C complier (after some advice on a previous thread) and Compaq Visual Fortran 6.5. Changing my C...
2
by: imonline | last post by:
Hi, I am generating XML and setting it into the string field. Which will be again generated into xml. Now the last xml which has xml in string field converts into "&gt" for the xml which is set...
2
by: pedestrian via SQLMonster.com | last post by:
I wonder is there any way I can turn off the "Documentation Feedback" section of the Books Online at the bottom of the pages... I'm printing some Books Online pages for own reference. Thanks in...
1
by: charliemears | last post by:
Hi there... How can I limit search results so that there is a "Next 10" and "Previous 10"? thanks for any reply....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.