Mail function error handling, multi-recipient methods...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dodger
Forum Newbie
Posts: 3
Joined: Sat Sep 27, 2003 2:06 pm

Mail function error handling, multi-recipient methods...

Post by Dodger »

Hey All,

Is it possible to return any info on the error with the mail function, or is it just simply "True or False"?

It would be nice to know why the message was not delivered, eg: "Over Quota" etc.

If not in the mail function, is it possible some other way?

Also, what is the best way to send mail to multiple recipients, looping with a single recipient or multiple recipients in one function call?

TIA.

Dodger.
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

the mail function only retuerns true or flase, i have't seen anything that can tell you anything after the email has been sent.


sending emails with a loop means no one knows who else you emailed, it also is slow as you prolly know.

sending email with bunch of emails put together is fast, but every one who you emailed will know who else you emailed...spam :P
Dodger
Forum Newbie
Posts: 3
Joined: Sat Sep 27, 2003 2:06 pm

Post by Dodger »

Unless the addresses are in the bcc field...
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Post by Cruzado_Mainfrm »

um, maybe you might want to write a socket version of the mail function, mailex(); and get returns, u can start by looking at current web mail applications written in php
Dodger
Forum Newbie
Posts: 3
Joined: Sat Sep 27, 2003 2:06 pm

Post by Dodger »

Thanks, I'll see what I can find.

D.
Post Reply