| PHP Mail configuration
|
dbarasuk

msg:4529564 | 7:26 am on Dec 19, 2012 (gmt 0) | Hi, I know this may be a stupid question for those of you who know. I just want to know what configuration I should make in the php.ini ocnfiguration file so I can be able to use the PHP mail function. In my company we have a local mail server (on our LAN) with a fixed IP address (different from the one where PHP is running from) and I wonder if the mail server IP address should be mentioned somewhere in the config file? Thanks so much for your attention.
|
coopster

msg:4531780 | 11:35 pm on Dec 28, 2012 (gmt 0) | It depends. If there is a sendmail program on your system PHP configure will do its best to determine where it is and use it. Otherwise you can set it explicitly. Have a look at the Installing/Configuring for mail() in the manual pages for more information: [php.net...]
|
dmorison

msg:4532219 | 7:51 pm on Dec 31, 2012 (gmt 0) | Alternatively the pear/Mail [pear.php.net] library is very easy to use;
$from = "you@example.com"; $to = "them@example.com"; $subject = "Testing"; $body = "Hello"; // $smtpinfo = array(); $smtpinfo["host"] = "<ip or host of your LAN mail server>"; $headers = array ('From' => $from,'To' => $to,'Subject' => $subject); $smtp = &Mail::factory('smtp', $smtpinfo ); $smtp->send($to, $headers, $body);
|
|
|