Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail


the mail() function

Moderators: macek, egami, gesf


Postby wenny_shu » Sat Apr 02, 2005 1:51 pm

HI guys,

I did change smtp and add header, but still error comes out.
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from =

$to = $_POST['S_EMAIL'];
$from = "";
$title = "your password";
#setting a header
$header = "From: me <>\r\n";
$body = " This email reminds you the password . Please direct all requests to Thank you.";
#now sending


Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\web\adm_email.php on line 9
Email has been sent!

:help: :help: :help:
New php-forum User
New php-forum User
Posts: 8
Joined: Fri Mar 04, 2005 11:28 am

Postby ruturajv » Sun Apr 03, 2005 8:28 pm

check this from the documentation
Code: Select all
$to      = '';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@' . $_SERVER['SERVER_NAME'] . "\r\n" .
   'Reply-To: webmaster@' . $_SERVER['SERVER_NAME'] . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

and please read this mail
User avatar
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.