To send mail for php...



Hi...

I am trying to send email for php for an email and I am not obtaining.
Please they help me....

Configuration of my PHP.ini:
SMTP = localhost

sendmail_from = my-email@xxxxxxxxxxxxxx

sendmail_path = /usr/sbin/sendmail

My System:
Suse 10

My code:
<?php
$to = "recipient@xxxxxxxxxxx";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>

Thanks for help...

.



Relevant Pages

  • Setting PHP to use SMTP
    ... In an effort to make emails that I send through PHP scripts not be mistaken for spam, it seems that one thing I need to do is make sure that the emails are sent via SMTP. ... SMTP localhost localhost ...
    (php.general)
  • Re: [PHP] Setting PHP to use SMTP
    ... The emails ALL end up going through SMTP sooner or later anyway. ... existing PHP package to connect, or use PHP to interface to an ... relays along the way... ... SMTP localhost localhost ...
    (php.general)
  • RE: [PHP] SMTP
    ... Subject: [PHP] SMTP ... but my website is on localhost (which has also the IP ... i tried to use IIS from windows to define a default SMTP server, ...
    (php.general)
  • Re: [PHP] SMTP
    ... but my website is on localhost (which has also the IP ... i think the problem is not in php.ini but more on SMTP server side (in ... So i have apache 2.24 installed and PHP 5.2.4. ... i tried to use IIS from windows to define a default SMTP server, ...
    (php.general)
  • Help with php5 install under windows
    ... This includes moving php from the ... Enable the PHP scripting language engine under Apache. ... or per-virtualhost web server configuration file. ... The PHP directives register_globals, ...
    (php.general)