473,503 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sending mails bounced to address different from sender address

hi all
i have a very specific question regarding emails sending and googling
doesn't help me
is a way exists to send email using .NET framework (System.Web.Mail or
something else)
and have the "from" address to be X
but if the message is bounced from not existing address or whatever, it
will be returned to adress Y ?

i tried to work by approach described in that article :
http://www.codeproject.com/useritems...dress_list.asp
it looks streigforard, but author is using easymail object
with System.Web.Mail i did not find any way to set OptionFlags to
prevent auto-creation of reverse-path

so , my code looks exactly like described in the article, but without
OptionFlag
and when i send mail to unavailable address, i got bounce to email
specified in "FROM" header

my code example if it can help :
<pre>
MailMessage oMsg = new MailMessage();
// bounced emails goes to email specified in oMsg.From
// sender name displayed for recipient is
oMsg.Headers["From"]oMsg.Headers.Add("Reply-To", oMsgDetails.ReplyTo);
oMsg.Headers.Add("From", oMsgDetails.Sender); oMsg.From =
txtBounceTo.Text ; //reverse-path
oMsg.Subject = oMsgDetails.Subject;
oMsg.BodyFormat = MailFormat.Html;
oMsg.Priority = MailPriority.Normal;
oMsg.To = emailAddress;
oMsg.Body = oMsgDetails.Content;
SmtpMail.SmtpServer = mailServer;
SmtpMail.Send(oMsg);
</pre>

appreciate any help
Thanks

Apr 11 '06 #1
2 1864
One way would be to set up a rule in the inbox for X to forward any messages
that have a specific text in the subject line to Y

No need to cross-post so much.

Jeff
<Sh********@gmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
hi all
i have a very specific question regarding emails sending and googling
doesn't help me
is a way exists to send email using .NET framework (System.Web.Mail or
something else)
and have the "from" address to be X
but if the message is bounced from not existing address or whatever, it
will be returned to adress Y ?

i tried to work by approach described in that article :
http://www.codeproject.com/useritems...dress_list.asp
it looks streigforard, but author is using easymail object
with System.Web.Mail i did not find any way to set OptionFlags to
prevent auto-creation of reverse-path

so , my code looks exactly like described in the article, but without
OptionFlag
and when i send mail to unavailable address, i got bounce to email
specified in "FROM" header

my code example if it can help :
<pre>
MailMessage oMsg = new MailMessage();
// bounced emails goes to email specified in oMsg.From
// sender name displayed for recipient is
oMsg.Headers["From"]oMsg.Headers.Add("Reply-To", oMsgDetails.ReplyTo);
oMsg.Headers.Add("From", oMsgDetails.Sender); oMsg.From =
txtBounceTo.Text ; //reverse-path
oMsg.Subject = oMsgDetails.Subject;
oMsg.BodyFormat = MailFormat.Html;
oMsg.Priority = MailPriority.Normal;
oMsg.To = emailAddress;
oMsg.Body = oMsgDetails.Content;
SmtpMail.SmtpServer = mailServer;
SmtpMail.Send(oMsg);
</pre>

appreciate any help
Thanks

Apr 11 '06 #2
I'm not sure if you can do this systematically because you are really at the
mercy of the receiver. If an email goes into a mail server where it will
bounce automatically, the email program on that server can be configured to
use either the From address or the Reply-To address. Thus, you have no
control over and can only hope that they'll use your Reply-To address.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

<Sh********@gmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
hi all
i have a very specific question regarding emails sending and googling
doesn't help me
is a way exists to send email using .NET framework (System.Web.Mail or
something else)
and have the "from" address to be X
but if the message is bounced from not existing address or whatever, it
will be returned to adress Y ?

i tried to work by approach described in that article :
http://www.codeproject.com/useritems...dress_list.asp
it looks streigforard, but author is using easymail object
with System.Web.Mail i did not find any way to set OptionFlags to
prevent auto-creation of reverse-path

so , my code looks exactly like described in the article, but without
OptionFlag
and when i send mail to unavailable address, i got bounce to email
specified in "FROM" header

my code example if it can help :
<pre>
MailMessage oMsg = new MailMessage();
// bounced emails goes to email specified in oMsg.From
// sender name displayed for recipient is
oMsg.Headers["From"]oMsg.Headers.Add("Reply-To", oMsgDetails.ReplyTo);
oMsg.Headers.Add("From", oMsgDetails.Sender); oMsg.From =
txtBounceTo.Text ; //reverse-path
oMsg.Subject = oMsgDetails.Subject;
oMsg.BodyFormat = MailFormat.Html;
oMsg.Priority = MailPriority.Normal;
oMsg.To = emailAddress;
oMsg.Body = oMsgDetails.Content;
SmtpMail.SmtpServer = mailServer;
SmtpMail.Send(oMsg);
</pre>

appreciate any help
Thanks

Apr 15 '06 #3

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

Similar topics

10
4942
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are...
7
3500
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
5
1514
by: cashdeskmac | last post by:
I am writing a web application will will be hosted on a few peoples laptops as a local application. It will send e-mails once the user connects to the internet. How can I set up the "Mail.From"...
3
3594
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
6
2715
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
1
8154
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
2055
by: SharpSmith | last post by:
hi all i have a very specific question regarding emails sending and googling doesn't help me is a way exists to send email using .NET framework (System.Web.Mail or something else) and have the...
4
2122
by: Zeeway | last post by:
hi,every one! I have a question about sending emails.My codes works well over some smtp servers,but doesn't over the others. My codes is listed belowed: try { MailMessage mailObj = new...
2
1803
by: softbreeze | last post by:
Operating systems: Windows 2003 Enterprise ASP.Net 2.0, IIS 6.0, *** SMTP is not installed *** I have a corporate network that has an SMTP server (10.254.3.30) on it. I have a subnet (10.5.42.0)...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
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...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.