Link to home
Start Free TrialLog in
Avatar of wmtocci
wmtocci

asked on

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\golegalsource\lSOscar\lsoscar.php on line 163

I created a flash form on my website and am trying to link the output of the form to the coordinator of the project and a copy of the form back to the originator. However, I am unable to generate the required  mail functions to
Avatar of Muhammad Wasif
Muhammad Wasif
Flag of Pakistan image

Use this sample code to test email fuction in lsoscar.php or simply pass the From: as explained in the example below

$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@yourdomain.com' . "\r\n" .
   'Reply-To: webmaster@yourdomain.com';

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


For more info on mail() function check http://www.php.net/manual/en/function.mail.php
check your php.ini for "sendmail_from" and see which email is there, if there is no email, mention one like below
and if there is ; before sendmail_from remove the ; (semicolon)

; For Win32 only.
sendmail_from = me@example.com

You can use PHPMailer to send mail via SMTP
http://phpmailer.sourceforge.net/
Avatar of wmtocci
wmtocci

ASKER

Problem is.. I have already set the SMTP function and Send_from/Send_path statements in the php.ini file. When I run lsoscar.php?debug=info, the Send_From & Send_path Local & Master Values show no value.
What servers are you running wmtocci?  IIS/Apache?
Avatar of wmtocci

ASKER

Webserver = Apache
MailServer = hMailServer
PHP Ver = 4.3.7
ASKER CERTIFIED SOLUTION
Avatar of LinuxNubb
LinuxNubb
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wmtocci

ASKER

BTW: I tried to configure phpmailer to no avail. Guess my brain is just too fried.
Avatar of wmtocci

ASKER

I have set the SMTP to relay mail for anyone