Depending on your $ObjMail
, a "successfully send mail" generally will equate to
- the sending mail server (i.e. smtp server) accepted the email or
- the
mail()
function got called (actually read the doc, especially the return value part).
Email functions rarely return a very useful value, as long as the email being sent is at least somewhat plausible. It will even return true, if the email address doesn't exist, the email gets bounced, your smtp server is blacklisted, ...
The probable answer to your question: Your output is almost instantaneous by default, unless your local sendmail
(the default on most hosts) call takes longer than a few microseconds, which it usually doesn't. Additionally, it doesn't say anything about the mails actually being sent. (And I assume, that you thought that was actually the case, it's not.)
My advice is, drop the stylish output and just send the mails. You can't be certain if they actually reached their target. If the $ObjMail
actually returns an error, that would probably be wise to log somewhere, so that you don't repeatedly send to the same false address.