Web Design Forum: From section of php email handler - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

From section of php email handler Generic "from" address instead of users submitted email address. Rate Topic: -----

#1 User is offline   Bellyfish 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 7
  • Joined: 02-July 09
  • Reputation: 0

Posted 05 August 2009 - 10:37 AM

I have a PHP file that is taking care of my email processes. The thing that I want to change is who the email is sent from when submitted. At present, the email is sent from the users email address that is inputed into the form. I want the "from" part of the email to be generic - ie "how1@etcetc.co.uk.

How do I do this? ? ? The code is below.


$subject="How much - Company Pension Enquiry";
/***********************************************/
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From:'.$Email . "\r\n";

Many thanks in advance.
0

#2 User is offline   dmpinder 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 431
  • Joined: 17-October 08
  • Reputation: 22
  • Gender:Male
  • Location:Glossop, Derbyshire, United Kingdom
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 05 August 2009 - 01:33 PM

$headers .= 'From:'.$Email . "\r\n";


Change the
$Email
to the email address you want.

Darren
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users