doubledee Posted October 10, 2011 Share Posted October 10, 2011 How do I make sure the "From" shows up in an e-mail sent from a form? Here is my code... // E-mail Inquiry to Administrator. $to = '[email protected]'; $subject = $trimmed['subject']; $inquiry = $trimmed['inquiry']; $from = $trimmed['senderEmail']; // $headers = $from; mail($to, $subject, $inquiry); // mail($to, $subject, $inquiry, $headers); When I do a test from my laptop, I get this in my e-mail inbox... Subject: Re: Test 1 From: [email protected] Date: Sun, Oct 09, 2011 8:46 pm To: [email protected] As you can see above, I did *not* include $from in my mail statement... What is going on? Debbie Quote Link to comment https://forums.phpfreaks.com/topic/248777-show-from-in-email/ Share on other sites More sharing options...
ohdang888 Posted October 10, 2011 Share Posted October 10, 2011 This doesn't asnwer your question, but, in general, depending on your host, I would send it from one of your own email addresses on your domain, then attach a reply-to with the from email. Most spam fliters don't like the from address not matching the domain it is being sent from Quote Link to comment https://forums.phpfreaks.com/topic/248777-show-from-in-email/#findComment-1277619 Share on other sites More sharing options...
doubledee Posted October 10, 2011 Author Share Posted October 10, 2011 This doesn't asnwer your question, but, in general, depending on your host, I would send it from one of your own email addresses on your domain, then attach a reply-to with the from email. Most spam fliters don't like the from address not matching the domain it is being sent from I don't understand what you are saying... Debbie Quote Link to comment https://forums.phpfreaks.com/topic/248777-show-from-in-email/#findComment-1277621 Share on other sites More sharing options...
darkfreaks Posted October 10, 2011 Share Posted October 10, 2011 try this: $headers .= 'From: <"'.$from.'">' . "\r\n"; Quote Link to comment https://forums.phpfreaks.com/topic/248777-show-from-in-email/#findComment-1277625 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.