How can I know if an email has been delivered?

the mail() function

Moderators: macek, egami, gesf

simplyroberto
New php-forum User
New php-forum User
Posts: 14
Joined: Fri Apr 15, 2005 6:53 am

How can I know if an email has been delivered?

Postby simplyroberto » Sat Sep 24, 2005 3:55 pm

Hello there,

Is there a way to automatically determine if an email sent with the mail() function has been successfully delivered?
Members of my website can send emails to each others. When an email bounces, I remove the recipient email address from the database. The problem is that I have to do this manually by checking all the bounces. Is there a way to automatically determine if an email has been successfully delivered? If there is, I could automatically delete from the database all recipients who are no longer able to accept emails.

Can anybody help?

Many thanks,
Roberto

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Sun Sep 25, 2005 1:36 am

well..you will need a php script to access your mailbox and check the bounces.. alternativly there might be a script that already does that, so you only need to search for it... use google and may be hotscript.com might help :)

simplyroberto
New php-forum User
New php-forum User
Posts: 14
Joined: Fri Apr 15, 2005 6:53 am

Postby simplyroberto » Sun Sep 25, 2005 3:18 am

Thanks Alexei,

Thanks for your suggestion. I actually thought about that solution, but I was hoping there was a neater way of doing it. But I suppose checking the bounces it's the only way...

Ta ta,
Roberto

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: How can I know if an email has been delivered?

Postby WiZARD » Sun Sep 25, 2005 2:54 pm

I think what you have a 2 variant:
1 put the form in mail whare you just make a request about readed mail.
2 do you know how people generate a images via php? same you a create a counter for images any and when mail opened in mail have a vimk on the image http://www.mysite.com/images/counterimage.php.

But in both solution have one problem user may configure mail as do not get mail as HTML. I this situation you are no not have a varian to get some info from user.

The best variant: you are registered user in our forum. do you remember how you do it? Yes, you submmited a registration using a link. :o)
Good luck.

P.S. This is not a code, It's just a logical propose.

User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Postby gesf » Mon Sep 26, 2005 12:52 am

Well, maybe i am being a bit stupid, but if we're talking about HTML emails.... can't we put a little JS (XmlHttpRequest) script to automaticaly(body onload event) call a server side script to make that validation...1?

I think it can be a solution... at least in last case.

simplyroberto
New php-forum User
New php-forum User
Posts: 14
Joined: Fri Apr 15, 2005 6:53 am

Postby simplyroberto » Mon Sep 26, 2005 2:02 am

Gesf,

Could you give me an example? Would actually all mail programs perform a body onload event? I believe some mail programs disable JS and I suppose emails are more likely to be marked as spam. Also I believe that would work only when the user actually opens the email, is that right?

Regards,
Roberto

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Mon Sep 26, 2005 12:40 pm

gesf: this is NOT foolproof at all... dont forget that most clients do not allow JS..
Especially when it comes to some security obsessed ffreaks like me and almost everyone i know :D


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest