skeener Posted February 22, 2007 Share Posted February 22, 2007 Hi..i got a problem with users submitted form to my emails. the sender always shows [email protected] is there any way to overcome this? thx in advance Link to comment https://forums.phpfreaks.com/topic/39578-help-with-php-email-sending/ Share on other sites More sharing options...
skali Posted February 22, 2007 Share Posted February 22, 2007 If you are not sending From header in your email headers then by default php picks up the default From header from php.ini which is [email protected]. So you need to send From header with the email address you want to send with. Link to comment https://forums.phpfreaks.com/topic/39578-help-with-php-email-sending/#findComment-190963 Share on other sites More sharing options...
skeener Posted February 22, 2007 Author Share Posted February 22, 2007 thx for the reply. i did put some variable on the headers. here's my code: $headers = "From: " . $_POST["nam"]; $headers .= "<" . $_POST["email"] . ">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-Path: " . $_POST["email"]; any problems in the headers ? Link to comment https://forums.phpfreaks.com/topic/39578-help-with-php-email-sending/#findComment-190966 Share on other sites More sharing options...
skali Posted February 22, 2007 Share Posted February 22, 2007 Does not seem like a problem with code. Try using '\n' only as on some servers it also causes problems. Link to comment https://forums.phpfreaks.com/topic/39578-help-with-php-email-sending/#findComment-190973 Share on other sites More sharing options...
skeener Posted February 22, 2007 Author Share Posted February 22, 2007 actually i have enable html tags so now i use <br> instead of \n . i will update u later. thx again Link to comment https://forums.phpfreaks.com/topic/39578-help-with-php-email-sending/#findComment-190976 Share on other sites More sharing options...
skali Posted February 22, 2007 Share Posted February 22, 2007 No matter html tags are enabled or not headers will use either '\r\n' or '\n' no html breaks. Link to comment https://forums.phpfreaks.com/topic/39578-help-with-php-email-sending/#findComment-190985 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.