ROCKINDANO Posted August 27, 2009 Share Posted August 27, 2009 Hey does anybody knows if i need some kind of setting set with our host or on the webserver to use the mail() function? I am working on a contact form and for some reason it doesn't send the email. Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/ Share on other sites More sharing options...
ignace Posted August 27, 2009 Share Posted August 27, 2009 Have you added the From: header? Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/#findComment-907648 Share on other sites More sharing options...
ROCKINDANO Posted August 27, 2009 Author Share Posted August 27, 2009 where? i believe i havent Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/#findComment-907663 Share on other sites More sharing options...
ROCKINDANO Posted August 27, 2009 Author Share Posted August 27, 2009 Do i need to set a setting or change a setting in the php.ini file? Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/#findComment-907665 Share on other sites More sharing options...
ignace Posted August 27, 2009 Share Posted August 27, 2009 Do i need to set a setting or change a setting in the php.ini file? You can use ini_set('sendmail_from', $from); or the better option: $headers = "From: $from\r\nReply-To: $from\r\n"; Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/#findComment-907668 Share on other sites More sharing options...
ROCKINDANO Posted August 27, 2009 Author Share Posted August 27, 2009 well now i am getting this error: Warning: mail() [function.mail]: Failed to connect to mailserver at " " port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\Program Files\Apache Software Foundation\Apache2.2\htdocs\processfeedback.php on line 58 Damn! It dont work i have set the smtp in the php.ini file Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/#findComment-907671 Share on other sites More sharing options...
ignace Posted August 27, 2009 Share Posted August 27, 2009 well now i am getting this error: Warning: mail() [function.mail]: Failed to connect to mailserver at " " port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\Program Files\Apache Software Foundation\Apache2.2\htdocs\processfeedback.php on line 58 Damn! It dont work i have set the smtp in the php.ini file Have you got an SMTP installed? Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/#findComment-907679 Share on other sites More sharing options...
ROCKINDANO Posted August 27, 2009 Author Share Posted August 27, 2009 yes i have a in house mail server Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/#findComment-907683 Share on other sites More sharing options...
ignace Posted August 27, 2009 Share Posted August 27, 2009 well now i am getting this error: Warning: mail() [function.mail]: Failed to connect to mailserver at " " port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\Program Files\Apache Software Foundation\Apache2.2\htdocs\processfeedback.php on line 58 Damn! It dont work i have set the smtp in the php.ini file Have you got an SMTP installed? Then modify your SMTP settings in the php.ini Link to comment https://forums.phpfreaks.com/topic/172141-solved-using-the-mail/#findComment-907716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.