Re: mail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, March 13, 2007 1:35 pm, Dani Dws wrote:
> I just want to know if the mail function works from a localhost (local
> server)?

It *can* be made to work, even if you have not succeeded so far.

> I've checked my php.ini all the setting are right but the mail
> function is
> not sending any mail, any idea?

Step 1.
Make sure you can send email from the command line, with PHP not in
the picture:

mail rodio_r@xxxxxxxxxxx
This is a test.
.

The . by itself on a line indicates the end of the message.

If that doesn't successfully send out mail, then adding PHP into the
mix is unlikely to also work. *

Step 2.
Make sure that the PHP user, which is not your usual login, can send
email.
su to the PHP user on the command line, and repeat step 1, and see if
it works.

In particular, the sendmail program has to be executable by the PHP
user, and the mail configuration (usually sendmail.cf) has to allow
the PHP user to send out email.

If you are not using sendmail, the moral equivalent of the preceding
sentence is still true.

Step 3.
Make sure php.ini has the correct settings for 'sendmail' (Un*x) or
'SMTP' (Windoze)

* Technically, your mail server could be configured to deny access to
you to send email, but allow PHP user to send email, but this is
unlikely.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux