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

Mail Problems

the mail() function

Moderators: macek, egami, gesf

Mail Problems

Postby t4feb » Thu Mar 18, 2004 11:56 am

Hi All:
Sure hope someone can help.
I keep receiveing this error when trying to send mail from php on apache server.

(Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Apache\Apache2\htdocs\sendmail.php on line 10

Warning: Cannot modify header information - headers already sent by (output started at C:\Apache\Apache2\htdocs\sendmail.php:3) in C:\Apache\Apache2\htdocs\sendmail.php on line 11)

Ok first of all I have set the php.ini
( [mail function]

This is the code I am uesing to send mail

$email = $_REQUEST[ 'email'] ;
$message = $_REQUEST['message'] ;

mail( "", "Feedback Form Results",
$message, "From: $email" );
header( "Location:");


This is the HTML code I am useing

<form method="post" action="sendmail.php">
Email: <input name="email" type="text" size="20" /><br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea><br />
<input type="submit" />

Any help on this on going problem!
Thanks in advance :help:
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Mar 18, 2004 11:21 am
Location: Taylor Mi


Postby ruturajv » Fri Mar 19, 2004 5:51 am

please check php.ini settings...

use localhost.. for the smtp... try.
check if sending mail requires user login.

use phpmailer class
User avatar
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Mail Problems

Postby t4feb » Fri Mar 19, 2004 6:28 am

Thanks I have used localhost on SMTP and receive the same error. I have tryed every SMTP I can think of as well as send from and still receive the error. That seems to be the only problem I have with PHP because I run alot of other things in PHP and all works well except sending mail. As far as the mail class I will try that and get back with you on this on going problem. Thanks againg for your help.
New php-forum User
New php-forum User
Posts: 2
Joined: Thu Mar 18, 2004 11:21 am
Location: Taylor Mi

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.