[SOLVED] sendmail_form? Sendmail isn't working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tristanlee85
Forum Contributor
Posts: 172
Joined: Fri Dec 19, 2003 7:28 am

[SOLVED] sendmail_form? Sendmail isn't working

Post by tristanlee85 »

Error:

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in c:\saturnspot\website\contact.php on line 136
mail not sent

Line 136:

Code: Select all

mail($emailto, $subj, $mesg, 'From: '.$_POST['emaila'].''."\r\n".'Content-Type: text/html; charset=iso-8859-1\n Content-Transfer-Encoding: 8bit\n')or die('mail not sent');
I tried searching for 'php.ini' and I have it in 2 locations:

c:\nusphere\apache
c:\nusphere\apache\php

In both files, I changed the 'sendmail' info to this:

Code: Select all

[mail function]
; For Win32 only.
SMTP = mail.charter.net

; For Win32 only.
;sendmail_from = tristanlee1985@charter.net
I'm still getting the error. Any ideas?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

;sendmail_from = tristanlee1985@charter.net
Tried removing that ; ? (then restarting apache)
tristanlee85
Forum Contributor
Posts: 172
Joined: Fri Dec 19, 2003 7:28 am

Post by tristanlee85 »

Well, I removed the ';'....but I forgot to restart :) I'll try that then post back.
tristanlee85
Forum Contributor
Posts: 172
Joined: Fri Dec 19, 2003 7:28 am

Post by tristanlee85 »

Uhh, the restart fixed it. Sorry for the ignorant post. Thanks for you help!
Post Reply