473,698 Members | 2,086 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

send mass mail and have bounces to go back to different 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.Mai l 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.Ad d("Reply-To", oMsgDetails.Rep lyTo);
oMsg.Headers.Ad d("From", oMsgDetails.Sen der); oMsg.From =
txtBounceTo.Tex t ; //reverse-path
oMsg.Subject = oMsgDetails.Sub ject;
oMsg.BodyFormat = MailFormat.Html ;
oMsg.Priority = MailPriority.No rmal;
oMsg.To = emailAddress;
oMsg.Body = oMsgDetails.Con tent;
SmtpMail.SmtpSe rver = mailServer;
SmtpMail.Send(o Msg);
</pre>
appreciate any help
Thanks

Apr 12 '06 #1
2 3218
The usual way to do this would be to set the Reply To address

"Sh********@gma il.com" wrote:
The usual way to do this would be by using Reply To, but the MailMessage
object doesn't seem to have a reply to property. It does however have a
headers collection so is supect you could set it in there.

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.Mai l 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.Ad d("Reply-To", oMsgDetails.Rep lyTo);
oMsg.Headers.Ad d("From", oMsgDetails.Sen der); oMsg.From =
txtBounceTo.Tex t ; //reverse-path
oMsg.Subject = oMsgDetails.Sub ject;
oMsg.BodyFormat = MailFormat.Html ;
oMsg.Priority = MailPriority.No rmal;
oMsg.To = emailAddress;
oMsg.Body = oMsgDetails.Con tent;
SmtpMail.SmtpSe rver = mailServer;
SmtpMail.Send(o Msg);
</pre>
appreciate any help
Thanks

Apr 12 '06 #2

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

Similar topics

4
2233
by: Giobibo | last post by:
I use the following code to send e-mails with PHP: if(@mail(....)) { //Send OK } else { //Send Bad } But how can I verify that a message was really sent (in case of "Sent
3
3131
by: somaboy mx | last post by:
I'm putting together a mass mailing application for sending out newsletters from a site admin area (no spam). I'm wondering how I can automate the removal of bounced addresses in this application. The ideal situation would be that returning mail triggers a script that removes the address of said message's recipient from the list. I'm thinking about a script that checks the pop3 server of the reply-to address and parses the inbox to...
4
4329
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the CDONTS component method. Can I just to localhost server to test, whether the form can be send up to the admin's email. Or I must have the Hosting server to do that. Can Anyone suggest me, how to I test my scripts can be successfully run (at...
6
2051
by: Mike the Canadian | last post by:
I am having a very strange problem sending email with php. I have two domains. I can send an email to one domain using php but not the other. If I put both email addresses in the mail command only the one email will arrive. I can send emails the traditional way to the problem domain and they arrive fine. Is there anything that might explain this? _______ Free Windows Clipboard Utility http://www.clipboardmagic.com/
11
2560
by: Jonah Olsson | last post by:
Hi guys, I'm trying to figure out how to use MailMessage to send mails with a different return path than the sender if the delivery fails. Here's the case: Sender: Joe's Pizza Sender email: joe@pizza.com Receiver: Matt Hill (from repository)
2
2336
by: Ron | last post by:
hi guys, I am trying to send email using smtpMail. I can send emails inside the organization, but out of the organization I get an error "The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for ........" now I tried to add username and password for the server to relay but it is still not working. this is the example i used:
2
2128
by: Yeah | last post by:
I have a simple fill-out form with three fields, in this order: Name, E-mail, and Comment. But when I receive the E-mail containing the form data, the fields are listed backwards (Comment, E-mail, Name). I've checked the CGI file, and it doesn't appear to control the sort order. Is there a way to tell the HTML code to sort the field data for E-mail?
39
3313
by: Viken Karaguesian | last post by:
Hello all, <SIGH> I'm soooooo sick and tired of getting spam e-mails. I'm sure that part of the reson for this is that my e-mail address is publicly available on my website, ready to be picked by e-mail harvesting programs. I tried to thwart them by adding a REMOVE_THIS in my e-mail address (username@REMOVE_THISispname.net), but the e-mails have not stopped. As for NG's, I have the return address blocked in a similar fashion.
2
2068
by: upendrajpr | last post by:
Dear friends I am sending mail from my site but it gives me some error "Warning: mail() : "sendmail_from" not set in php.ini or custom "From:" header missing in C:\P............." my code is this
0
8672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9155
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8890
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3038
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 we have to send another system
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.