Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > sending mails bounced to address different from sender address

Reply
Thread Tools

sending mails bounced to address different from sender address

 
 
SharpSmith@gmail.com
Guest
Posts: n/a
 
      04-11-2006
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

 
Reply With Quote
 
 
 
 
Jeff Dillon
Guest
Posts: n/a
 
      04-11-2006
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
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
 
 
 
Christopher Reed
Guest
Posts: n/a
 
      04-15-2006
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."

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling Bounced E-Mails Frank ASP .Net 1 08-14-2006 09:40 PM
RTCP:Can a sender sender reception report blocks in an SR packet for recievers for which it hasn't recieved any RTP data? jon wayne VOIP 0 05-20-2006 12:23 PM
Re: fix a "sender" name in the "sender" field on email Dylan Parry HTML 2 03-19-2005 04:21 PM
Sender Virus-alert (sender: python-list@python.org) Antivirus-Daemon@maciot.ulpgc.es Python 0 08-19-2003 12:40 PM
Why are sender and object used as in sender As System.Object, ByVal e As System.EventArgs? Showjumper ASP .Net 2 08-02-2003 10:53 PM



Advertisments