Click here to Skip to main content
15,914,221 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

My application sends newsletter with automatically generated sender - addresses, because if one of the recipients is not reachable, i want to know which newsletter that was.
When I connect to a Mailserver using system.net.mail, i do not have credentials at this time (they are generated later).

when the e-mail is sent, it works without credentials (the sender attribute of the message is set in a different step of the whole process, so the mail has the right sender address, but is not sent from this account. instead it's sent without authentification)

however, normally when a recipient is not reachable, i get a bouncemail into my mailbox, but in this case not.

when i connect to the mailserver via telnet on port 25 (also without user authentification) and send an e-mail with this senderaddress (the account exists in that case and in case of sending over my application)
the bouncemail is in the senders mailbox.

In fact, bouncemails are always sent to the sender of an e-mail, and the mails which are sent successfully contain the right sender mail address.

in the end i want to excuse my bad english,
i hope someone of you can help me

regards
Posted

I very much doubt you can get the bounced mails without the user account details of the sender.

Outgoing mail utilises SMTP
Incoming mail utilises POP3

It looks like in this instance the outgoing SMTP server is acting as an open relay without the need for authentication.

The bounced mail will have to be received with POP, and will need the user account details to access the mailbox.

[It might be possible to set a Reply-To different from the sending address and pick it up from a mailbox for which you have access, but i'm not sure if the bounce back goes to the originator only or can be redirect using the reply to.]
 
Share this answer
 
There are a few things you can do to check if an e-mail is valid before you send the mail.

Run a regex match against the e-mail address
Confirm the domain exists by doing a dns look up
Simulate an smtp handshake with the target server and check the e-mail address.

The following is an article which reports to do all these things.

http://www.codeproject.com/KB/validation/Valid_Email_Addresses.aspx

After the mail is sent you can connect to exchange and search the inbox. Exchange has an SDK which can be used in the .Net environment.

The following as a link to microsofts Exchange SDK documentation

http://www.microsoft.com/downloads/details.aspx?FamilyID=5ca18d40-5a37-4a20-94ae-6a6cf6cb846d&displaylang=en
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900