How to Confirm That Mail Has Been Delivered or Not

How to confirm that mail has been delivered or not?

You can't. Since you use SMTP, in general case, it's impossible to tell whether delivery succeeded or not. Read SMTP specification. Mail is routed while being delivered, so:

  1. There's no guarantee your message is sent as soon as you call smtp.Send().
  2. Since SMTP is routed, you can't be sure that some node on the route won't fail with delivery to uplink.

How to check if the sent email delivered or not?

I think it is impossible.

Think it as a real life example.

If you send a letter to someone. You also don't know if he will receives it. Unless he calls you and says "hey, i've your letter"

And also, he has to call you, if he has read the letter which sounds strange, don't you think?

It would be all possible if you've a own message service thing, or application like e.g. facebook. They can store the fact that you've opened the "mail" but than it isn't actually a mail but rather a messege to another user. And doesn't use email adresses nor emails

How to check if last email sent was successfully delivered or not using MIME::Lite perl

You don't need to use the eval block or do anything fancy to ensure that the mail has been sent; that is what last_send_successful is for. When the send subroutine successfully completes its work, it sets an internal variable ($object->{last_send_successful}); this is what the last_send_successful sub is checking. It is usually not necessary to use an eval block unless you are trying to prevent a script dying or throwing a runtime or syntax error.

You can simplify your code to something like the following:

$msg->send;

if ($msg->last_send_successful) {
# woohoo! Message sent
}
else {
# message did not send.
# take appropriate action
}

or

$msg->send;

while (! $msg->last_send_successful) {
# message did not send.
# take appropriate action
}

How do I know if an email has been delivered using PHP?

You can check it's been sent, but checking it's been delivered is another thing entirely.

In fact, I can't think of any way to confirm it's been delivered without also checking it gets read, either by including a 1x1 .gif that is requested from your server and logged as having been accessed, or a link that the user must visit to see the full content of the message.

Neither are guaranteed (not all email clients will display images or use HTML) and not all 'delivered' messages will be read.

You can of course, monitor your reply-to address for any bounced mail which will let you say with certainty that a message hasn't been delivered.

Email Delivery Message in Asp.net(how to check whether the email sended?)

On Adding:

message.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;

Delivery Notification Mail works. But i have to store undelivered mail details in db. How to track that undelivered mails(By Username).

How to check if the mail has been sent successfully

if your SmtpMail.Send(message) method returns no error, it means the email was sent to the SMTP server, then you are out of your jurisdiction, that is how far you can know.



Related Topics



Leave a reply



Submit