ensuring e-mails are sent
Moderator: General Moderators
ensuring e-mails are sent
can you help me to write a script for mail form thet ven I click a send butom want to be sure thet the email is posted
- there are two possible (major) error conditions
- your local mta refuses to take the mail (php's mail() probably returns false)
- any gateway on the way refused to deliver the mail (user/addr does not exist, relaying not allowed, whatsoever)
Which of the two cases do you want to cover?
- Fredix
- Forum Contributor
- Posts: 101
- Joined: Fri Jul 18, 2003 2:16 pm
- Location: Wehr (Eifel) Germany
- Contact:
From my point of view you can only check if the server has accepted your mail for delivering:
$gonna_be_delivered = mail();
The variable is boolean and contains either TRUE or FALSE.
See php.net/mail for more info.
I can't imagine how to solve the the second case volka mentioned, because you can not let a script run for hours to wait for some remote server response.....
$gonna_be_delivered = mail();
The variable is boolean and contains either TRUE or FALSE.
See php.net/mail for more info.
I can't imagine how to solve the the second case volka mentioned, because you can not let a script run for hours to wait for some remote server response.....
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA