send mail to more then 1 person

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
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

send mail to more then 1 person

Post by pelegk2 »

i recive this error :
Warning: mail(): SMTP server response: 501 Syntax error, parameters in command "MAIL FROM:<pelegk@woowww.com, david_bt@woowww..com>" unrecognized or missing in C:\Program Files\Apache Group\Apache2\htdocs\test\mail2.php on line
why is that
?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'd guess it's because of 2 email addresses in the from, the latter being bad and in the wrong syntax.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

well i know that

Post by pelegk2 »

I'd guess it's because of 2 email addresses in the from
that the perpuse! so how do i send the email to 2 persons?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

put their addresses in the "to" side. From is supposed to be 1 person/address. To/CC/BCC can be any number of persons/addresses.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

oppps my ,istake
ianlandsman
Forum Newbie
Posts: 24
Joined: Thu Dec 30, 2004 9:50 pm
Location: New York

Post by ianlandsman »

You might want to try using the phpmailer library: http://phpmailer.sourceforge.net/. I've had alot of success with it.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

ok")
Post Reply