setting sendmail_from with ini_set

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:

setting sendmail_from with ini_set

Post by pelegk2 »

i am trying to do :

Code: Select all

ini_set("sendmail_from","sdfgsdfgsdfg <peleg@mymailmail.com>");

but i recove the error :
Warning: mail(): SMTP server response: 501 Syntax error, parameters in command "MAIL FROM:<sdfgsdfgsdfg <peleg@mymailmail.com>>" unrecognized or missing in C:\Program Files\Apache Group\Apache2\htdocs\test\lhereg.php on line


anuy oidea why?
thnaks i nadvance
peleg
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

makes me think you have a little typo

MAIL FROM:<sdfgsdfgsdfg <peleg@mymailmail.com>>

mind the double >>


Code: Select all

ini_set('sendmail_from', 'peleg@mymailmail.com');
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:

your solution i know

Post by pelegk2 »

but i dont wwant that i want to add the user full name~!!!
and about the >> i dont know from where that have come -maybe that the problem!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can't do the name there.. it has to be done in the headers.
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:

so u mean that

Post by pelegk2 »

only this can be done :

Code: Select all

ini_set(&quote;sendmail_from&quote;,&quote;peleg@mymailmail.com&quote;);
Post Reply