Forum Moderators: coopster

Message Too Old, No Replies

problem with Mail() on testing server

         

Sarah Atkinson

5:03 pm on Jul 29, 2005 (gmt 0)

10+ Year Member



I've been trying to test this mail form on my local machine and all i get is

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or Custom "From:" header missing

my custom function header is set to
$mail_header='From: satkinson$myemail.org';

and i have that set int he ini file too. I also set the SMTP server in the ini file to our mail server's static ip address.

So can anyone tell me why it will not work?

Sarah

jatar_k

5:45 pm on Jul 29, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



is the $myemail var supposed to resolve? It won't inside single quotes.

You also need "\r\n" at the end of each line in the mail header, these have to be inside double quotes or they will just be literals and not the proper CR LF

Sarah Atkinson

6:11 pm on Jul 29, 2005 (gmt 0)

10+ Year Member



satkinson$myemail.org

that is supose to be an @ instead of a $(I guess I got a little $$$ happy.)
with the (/n)s

I don't quite understand the ""

do you mean "bla bla bla /n"

or "bla bla bla "/n""

jatar_k

6:15 pm on Jul 29, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



$mail_header="From: satkinson@myemail.org\r\n";

that would be the right way

Sarah Atkinson

4:47 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



It still wouldn't work.. however when I loaded it onto the remote server it worked. Iguess as long as it works there everything is fine right?

jatar_k

2:55 pm on Aug 2, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



sorry, MIA for a few days

>> as long as it works there

true enough ;)

Is your remote server a *nix server or is it a windows box as well?

Sarah Atkinson

5:20 pm on Aug 2, 2005 (gmt 0)

10+ Year Member



windows

jatar_k

5:22 pm on Aug 2, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if you did want to check this out more you could put up a phpinfo() page up on each and take a look at the differences.