question

peterliles-4155 avatar image
0 Votes"
peterliles-4155 asked YijingSun-MSFT commented

Receive acknowledgment of Email failure with distributed list

I am testing my email function in developer connected to internet and when sending to a distributed list of receivers the program does not catch those receivers that fail to be delivered if any are a success. I just get a message to my email account to inform me of none delivery to specific user.


*For i As Integer = 0 To recipients.Count() - 1

             mailMessage.To.Clear()
             mailMessage.To.Add(New System.Net.Mail.MailAddress(recipients(i).EmailAddress, recipients(i).UserName))
             
     Next

Dim userState As Object = mailMessage
Try

         smtpClient.SendAsync(mailMessage, userState)
     Catch failedRec As System.Net.Mail.SmtpFailedRecipientsException
         'Choose to resend?

End Try*
I was hoping to catch each recipient exception here ? so that i can process a failure to send notice instead of a current success as is the case on both failure and succeed.

dotnet-aspnet-webforms
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @peterliles-4155,
Delivery Status Notifications to DL's are prohibited as per SMTP Service Extension for Delivery Status Notifications (DSNs) rfc 3461. As per this protocol in section 5.2.7.1 mailing lists :
it is important that DSNs NOT be issued by both the MTA (to report successful delivery to the list), and the list (to report message rejection using a "failure" DSN.)
Best regards,
Yijing Sun

0 Votes 0 ·
peterliles-4155 avatar image
0 Votes"
peterliles-4155 answered YijingSun-MSFT commented

I get the following message delivered to my account. Is this the standard reply when unable to send to recipients address?
According to your answer then i am unable to verify if message was delivered to recipients address successfully?

Is there an alternative approach to DL's such as execute the object SmtpClient.SendAsync(mailMessage) for each recipient address instead and would then return a failure response from server.

Mail Delivery Subsystem <mailer-daemon@googlemail.com>
To:

Wed, 18 Aug at 20:20

Error Icon
Address not found
Your message wasn't delivered to fdgh@google.com because the address couldn't be found, or is unable to receive mail.
LEARN MORE
The response was:
The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. Learn more at https://support.google.com/mail/answer/6596

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @peterliles-4155,
As far as I think,there is no reliable way to find out if a message was indeed delivered.The message has to be handed off sequentially from one server to the next server in the chain until it reaches that final authoritative server. This means that there is not a guaranteed method for authenticating a specific address.Once your SmtpClient.SendAsync(mailMessage) method returns no error, it means the email was sent to the SMTP server, that is all you can know.
Best regards,
Yijing Sun

0 Votes 0 ·

I was wondering. i receive a failure notification email message in my yahoo account when message undelivered. Can i retrieve that message from my server and send to a personal folder on my website for inspection?
I notice documentation refers to the retrieval and deletion of messages from smtp server using certain protocols such as pop3.

0 Votes 0 ·

Hi @peterliles-4155 ,
SMTP server is only as a relay from any address and send to the next server.You can't know which server have a failure.So,I don't know how you could retrieve the message from which server.
Best regards,
Yijing Sun

0 Votes 0 ·
peterliles-4155 avatar image
0 Votes"
peterliles-4155 answered YijingSun-MSFT commented

i want to retrieve the failure notification message that is sent to my yahoo account. I can read it by login to my yahoo account but i would prefer to access it and read at my computer after i send the list of messages.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @peterliles-4155 ,
If you used Pop3 or IMAP to receive the email ,you could use EAGetMail.NET to parse the failure report.
Best regards,
Yijing Sun

0 Votes 0 ·