Jump to content

PHP

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
php programmer

php programmer

    Newbie

  • Members
  • Pip
  • 2 posts
How to check whether the mail has been successfully send using mail function in php?

Please any one tell me.......Thanks

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
According to PHP: mail - Manual it returns a boolean value: "Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise."

so more or less, you can do:
if (mail(...)) {
    echo "success";
} else {
    echo "failure";
}

__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall