garydt Posted June 20, 2007 Share Posted June 20, 2007 The error i'm getting is Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Program Files\xampp\htdocs\epeople\editphoto.php on line 194 $big = $row_Recordset2['bigimagename']; $username = $row_Recordset4['usernm']; $from = 'test@uk.com'; $to = 'gary@garyt.co.uk'; mail($to,$from,$big,$username); the settings in php.ini are [mail function] ; For Win32 only. ;SMTP = smtp.tiscali.co.uk ;smtp_port = 25 ; For Win32 only. sendmail_from = me@localhost.com sendmail_path = C:\Program Files\xampp\sendmail pop3_server= pop.tiscali.co.uk pop3_username= garydt88 pop3_password= garytanner What have i got wrong? Quote Link to comment https://forums.phpfreaks.com/topic/56352-problems-with-sending-mail/ Share on other sites More sharing options...
dahc Posted June 20, 2007 Share Posted June 20, 2007 Try switching your "mail" order around. mail("john@example.com", "An HTML Message", $body, $from); Or adding headers: $headers = "From: info@example.com \r\n"; $headers.= "Content-Type: text/html; charset=ISO-8859-1 "; $headers .= "MIME-Version: 1.0 "; mail("john@example.com", "An HTML Message", $body, $headers); Quote Link to comment https://forums.phpfreaks.com/topic/56352-problems-with-sending-mail/#findComment-278494 Share on other sites More sharing options...
garydt Posted June 21, 2007 Author Share Posted June 21, 2007 Thanks. I tried- // send emmail $big = $row_Recordset2['bigimagename']; $username = $row_Recordset4['usernm']; $from = 'test@uk.com'; $to = 'gary@garyt.co.uk'; $body = "test"; $headers = "From: info@example.com \r\n"; $headers.= "Content-Type: text/html; charset=ISO-8859-1 "; $headers .= "MIME-Version: 1.0 "; mail("gary@garyt.co.uk", "An HTML Message", $body, $headers); And i got error- Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for gary@garyt.co.uk in C:\Program Files\xampp\htdocs\epeople\editphoto.php on line 200 Quote Link to comment https://forums.phpfreaks.com/topic/56352-problems-with-sending-mail/#findComment-279187 Share on other sites More sharing options...
garydt Posted June 21, 2007 Author Share Posted June 21, 2007 I'm still getting error- Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for gary@garyt.co.uk in C:\Program Files\xampp\htdocs\epeople\editphoto.php on line 200 What does it mean? Quote Link to comment https://forums.phpfreaks.com/topic/56352-problems-with-sending-mail/#findComment-279437 Share on other sites More sharing options...
garydt Posted June 21, 2007 Author Share Posted June 21, 2007 I've sorted the above problem and i'm not getting errors but i'm not recieving the emails. Why would this be? Quote Link to comment https://forums.phpfreaks.com/topic/56352-problems-with-sending-mail/#findComment-279552 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.