How to do coding to check mail delivered or not

Hi All,
Plz tell me how this problem will solved.
“when mail is send,how we are going to check that mail is delivered or
not”
Thanks

Hi…
thanks for reply
i am using deliver method of actionmailer to send mail… mail is sending
successfully but how can i find it delivered or not
Thanks

Phlip wrote:

Anshali D. wrote:

Hi All,
Plz tell me how this problem will solved.
“when mail is send,how we are going to check that mail is delivered or
not”

At test time?

Either set up a lite mail SMTP client, send it your mail, and have your
test
code use POP3 to fetch it…

or use a mock object and manually test that it’s mocking the right
thing.

Under Rails, for example, the mock is built-in…

Anshali D. wrote:

Hi All,
Plz tell me how this problem will solved.
“when mail is send,how we are going to check that mail is delivered or
not”

At test time?

Either set up a lite mail SMTP client, send it your mail, and have your
test
code use POP3 to fetch it…

or use a mock object and manually test that it’s mocking the right
thing.

Under Rails, for example, the mock is built-in…

No he means how do you tell what the SMTP server has responded with,
and how can you tell whether it has been rejected for some reason or
other :slight_smile:

Blog: http://random8.zenunit.com/
Learn rails: http://sensei.zenunit.com/

Anshali D. [email protected] writes:

Plz tell me how this problem will solved.
“when mail is send,how we are going to check that mail is delivered or not”

It is not possible. There is absolutely now way in this universe to
be able to know that a message has been delivered or not.

Some protocols such as X400 try hard to give delivery notices,
unfortunately there are always cases when they fails.

For this reason, internet protocols such as SMTP don’t even try. They
do their best to make it work, but offer no guarantee, and foremost,
they don’t guarantee any feedback.

When sending a message, there are a lot of entities involved. You,
your UA, your MTA, possibly some intermediary MTA, the recipient MTA,
the recipient UA, the recipient. Well, no not exactly anymore. There
are chances that your recipient has several mail boxes, and that he
uses a web service to collect emails from his several boxes to gather
them into a single UA, so it may be like: You, your UA, your MTA,
possibly some intermediary MTA, the recipient MTA, the collector UA,
the collector MTA, the actual recipient MTA, the actual recipient UA,
the recipient. Between each of these entitites, there may be some
level of positive or negative acknowledgement. But that’s all.
Entity N will know that the message has been received by entity N+1 in
the chain, but then communication is closed, and it won’t know what
happens, and when, between entities N+1 and N+2. If there is a
problem with some luck a MTA may send back an error message to the
sender, but this is not necessarily done much anymore because of SPAM
and viruses.

Well, eventually, your message may arrive at the final recipient’s UA.
There, something may be done to be informed that it has been received,
or possibly even displayed, with means of some unstandardized header
in the message. Some UA can be configured easily to insert these
headers, and to honor them or not. Privacy and SPAM/viruses savy
users won’t activate this feature (it allows addresses collectors to
validate easily an email address for resale to spammers), so the
probability that you would get an actual answer will be very low
(unless you are sending emails to dumbasses).

But even with this feature activated and working well, the fact that
you receive a message sent by the UA of the recipient telling you that
your email has been displayed doesn’t prove anything. Notably, it
doesn’t prove that your message has been viewed by the recipient, much
less that he has read it, and even less that he has understood it!

In conclusion, you can technically determine that your message has
been sent to the first entity in the chain. That’s all. From there
on, play it will be received, read and understood.

If you want to be sure that the mail is delivered or not, you have to
use a higher level protocol. For example, if you ask a question in
your email expecting an answer A1 or an answer A2, you have four
possibilities:

  • you get an answer A1.
    You can assume the mail is delivered, and read.
    But was it understood? Was really A1 the answer the recipient meant
    to send?

  • you get an answer A2.
    You can assume the mail is delivered, and read.
    But was it understood? Was really A2 the answer the recipient meant
    to send?

  • you get an answer A3.
    You can assume the mail is delivered, and read, and not understood.

  • you don’t get an answer in some delay.
    You cannot assume anything. Try to send another email eliciting an
    answer.
    If you still don’t get any confirmation of an actual communication
    try to phone the recipient. Or to meet in person. Or to hit him in
    the face. If you still don’t get any answer, you can consider your
    recipient in a coma or dead, and assume the message doesn’t pass thru.
    (some persons believe it’s worthwhile to communicate with somebody
    in a coma, but I believe that it’s only good to stimulate their
    brain, you can’t expect answers, they won’t start to answer to your
    backlog discussions when they awake).

UA = User Agent = mail program
MTA = Mail Transfer Agent = mail server

Phlip wrote:

Anshali D. wrote:

i am using deliver method of actionmailer to send mail… mail is
sending successfully but how can i find it delivered or not

You can’t. If your mail gets as far as POP3, actionmailer will return
“success”.

as far as SMTP.

POP3 is the side you can’t see!

Anshali D. wrote:

i am using deliver method of actionmailer to send mail… mail is sending
successfully but how can i find it delivered or not

You can’t. If your mail gets as far as POP3, actionmailer will return
“success”.

You could send the kind of mail that triggers an automatic reply when a
user
agent presents the mail to its human (the automatic reply that spammers
love!),
but then you need a whole new web service to fetch this reply!