zMastaa Posted July 19, 2010 Share Posted July 19, 2010 One of our clients is using a webhost that blocks all emails sent from an unknown i.p. address....basically blocking any email forms being used on their server. The hosts have said for emails to be sent via their server the form needs to act as if the email was sent from the SERVER ip address and not the remote address. Anyone know any ways to do this Quote Link to comment https://forums.phpfreaks.com/topic/208171-sending-a-form-that-has-the-sending-servers-ip-in-the-from-header/ Share on other sites More sharing options...
Adam Posted July 19, 2010 Share Posted July 19, 2010 You need to add a "From" header to your headers parameter when calling mail, and set the value to $_SERVER['SERVER_ADDR']. Quote Link to comment https://forums.phpfreaks.com/topic/208171-sending-a-form-that-has-the-sending-servers-ip-in-the-from-header/#findComment-1088109 Share on other sites More sharing options...
zMastaa Posted July 19, 2010 Author Share Posted July 19, 2010 Return-path: <[email protected]> Envelope-to: [email protected] Delivery-date: Mon, 19 Jul 2010 08:16:19 -0500 Received: from <REMOTE IP ADDRESS HERE> (envelope-from <[email protected]>) id 1OaqCg-00076V-Ml for [email protected]; Mon, 19 Jul 2010 08:16:19 -0500 Received: by xxxx-imac.local (Postfix, from userid 501) id 3721334B690; Mon, 19 Jul 2010 14:15:54 +0100 (BST) To: [email protected] Subject: Contact Form Submission From: [email protected] Reply-to: [email protected] Cc: [email protected] Message-Id: <[email protected]> Date: Mon, 19 Jul 2010 14:15:54 +0100 (BST) X-Spam-Status: No, score=1.5 X-Spam-Score: 15 X-Spam-Bar: + X-Spam-Flag: NO The form below was submited by from Ip address: 127.0.0.1 on 07/19/2010 at 02:15 pm ------------------------------------------------------------------------- Name: test Company: testcomp Email: [email protected] Telephone: 000000000 mailingList: Comments: test contents I need the server address to be where in the actual header else the server will not send it Quote Link to comment https://forums.phpfreaks.com/topic/208171-sending-a-form-that-has-the-sending-servers-ip-in-the-from-header/#findComment-1088112 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.