Hi,
I need to use mail() function on several PHP pages.
(we are renting web space on win2000 server and have access through H-Sphere control panel)
error:
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing
I put a copy of php.ini in the root of my website as someone from tech support suggested some time ago.
here is what it looks like in php.ini after my changes:
----------------------------
[mail function]
; For Win32 only.
SMTP = mail.MyWebSite.com ; for Win32 only
;smtp_port = 25
sendmail_from= webmaster@MyWebSite.com ; for Win32 only
------------------------------------------------------
still getting the same error...
Is php.ini in the wrong place or something else is not correct?
thank you
---------------------------------------------------------
test file w/php mail function:
<?php
$email = "mytest@mytest.com"; # email address of recipient
$subject = "This is a test email"; # subject of email
$body = "This is where the text goes...";
$mail_hrd = "From: webmaster@MyWebSite.com <webmaster@MyWebSite.com;";
mail($email,$subject,$body,$mail_hdr)
?>
I need to use mail() function on several PHP pages.
(we are renting web space on win2000 server and have access through H-Sphere control panel)
error:
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing
I put a copy of php.ini in the root of my website as someone from tech support suggested some time ago.
here is what it looks like in php.ini after my changes:
----------------------------
[mail function]
; For Win32 only.
SMTP = mail.MyWebSite.com ; for Win32 only
;smtp_port = 25
sendmail_from= webmaster@MyWebSite.com ; for Win32 only
------------------------------------------------------
still getting the same error...
Is php.ini in the wrong place or something else is not correct?
thank you
---------------------------------------------------------
test file w/php mail function:
<?php
$email = "mytest@mytest.com"; # email address of recipient
$subject = "This is a test email"; # subject of email
$body = "This is where the text goes...";
$mail_hrd = "From: webmaster@MyWebSite.com <webmaster@MyWebSite.com;";
mail($email,$subject,$body,$mail_hdr)
?>