phpQuestioner Posted March 27, 2007 Share Posted March 27, 2007 My host requires me to list a email address from within my domain to send and receive php emails. So in my "From", I have to use [email protected]. Is there any way I can still keep my "From" address as a normal mailto email address (like: "[email protected]"), but display the name of my business in my clients email application? Example Date Subject From 03/27/07 John Doe's Roofing Has Receive Your Email John Doe's Roofing Inc. Is there any way I can do this? Link to comment https://forums.phpfreaks.com/topic/44451-about-masking-php-mail-from-address/ Share on other sites More sharing options...
NSW42 Posted March 27, 2007 Share Posted March 27, 2007 Are your trying to hide your actual email address to the recipient ? Link to comment https://forums.phpfreaks.com/topic/44451-about-masking-php-mail-from-address/#findComment-215876 Share on other sites More sharing options...
phpQuestioner Posted March 27, 2007 Author Share Posted March 27, 2007 not so much - if they see the email address that is fine; but I would just like them to easily identify who the sender is. I think my customers would be more likely to realize who it is that is sending them an auto reply; if the business name was in the "From" section of their email client. I don't want them to just see an email address and not know who it is and just automatically think my auto replier is spam. You know what I mean? It may be filtered out as spam any way - automatically by their client; but I at least want to make an effort to establish auto reply. Link to comment https://forums.phpfreaks.com/topic/44451-about-masking-php-mail-from-address/#findComment-215944 Share on other sites More sharing options...
NSW42 Posted March 27, 2007 Share Posted March 27, 2007 post your php mailer script Link to comment https://forums.phpfreaks.com/topic/44451-about-masking-php-mail-from-address/#findComment-215949 Share on other sites More sharing options...
Leeder Posted March 27, 2007 Share Posted March 27, 2007 In the mailing script, just change the from header to whatever you'd like. $subject = "I Made Pizza"; $message = "=)"; $from = "That Wacky Pizza Dude"; $headers = "From: $from"; mail($email, $subject, $message, $headers); echo "Ok, $username!<br />"; echo "Soon you should get an email!"; ...or something like that. Link to comment https://forums.phpfreaks.com/topic/44451-about-masking-php-mail-from-address/#findComment-215953 Share on other sites More sharing options...
phpQuestioner Posted March 27, 2007 Author Share Posted March 27, 2007 <?php @$Name = addslashes($_POST['Name']); @$Email = addslashes($_POST['Email']); @$Phone = addslashes($_POST['Phone']); @$Comments = stripslashes($_POST['Comments']); if () { // For Validation Would Be Here } // The "From" cannot be changed to an address outside my domain - hosting rules $header = "From: [email protected]\n" . "Reply-To: [email protected]\n"; $subject = "Order Confirmation"; $email = "$Email"; $message = "$Name We Have Successfully Received Your Email And Will Be Contacting You Soon.\n\n\nThank You For You Business\nJohn Doe's Roofing Inc."; @mail($email, $subject ,$message ,$header ) ; ?> Link to comment https://forums.phpfreaks.com/topic/44451-about-masking-php-mail-from-address/#findComment-215967 Share on other sites More sharing options...
phpQuestioner Posted March 27, 2007 Author Share Posted March 27, 2007 So I tried this: <?php @$Name = addslashes($_POST['Name']); @$Email = addslashes($_POST['Email']); @$Phone = addslashes($_POST['Phone']); @$Comments = stripslashes($_POST['Comments']); if () { // For Validation Would Be Here } // The "From" cannot be changed to an address outside my domain - hosting rules $header = "From: John Doe's Roofing Inc. <[email protected]>\n" . "Reply-To: [email protected]\n"; $subject = "Order Confirmation"; $email = "$Email"; $message = "$Name We Have Successfully Received Your Email And Will Be Contacting You Soon.\n\n\nThank You For You Business\nJohn Doe's Roofing Inc."; @mail($email, $subject ,$message ,$header ) ; ?> but it still produced the same results. Actual email address is visible in the "From" section of email client. Link to comment https://forums.phpfreaks.com/topic/44451-about-masking-php-mail-from-address/#findComment-215986 Share on other sites More sharing options...
phpQuestioner Posted March 28, 2007 Author Share Posted March 28, 2007 Does anyone know how I can accomplish what I am trying to do? Link to comment https://forums.phpfreaks.com/topic/44451-about-masking-php-mail-from-address/#findComment-216501 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.