Go Back   Novahq.net Forum > phphq.Net > phphq.Net Forums

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-28-2013, 02:38 PM
Bamboozle is offline Bamboozle
Registered User

Join Date: Mar 2013
Posts: 2

phMailer question

Hi everyone, first post here, so hello all.

I am trying to adapt the phMailer form so that it sends email from my email address, my host (dreamhost) block any emails that are sent by web pages from a non-dreamhost email address, so I need to make sure it's coming from my email address or it won't work!

I'm guessing this is the line I need to adapt:

Code:
$headers.="X-Sender: ".$_SERVER['REMOTE_ADDR']."\n";
But with php not being my first spoken language I can't get it to work, any help would be greatly appreciated
Reply With Quote
  #2  
Old 03-29-2013, 08:42 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,919

You would want to change this:
PHP Code:
        //Headers
        
$headers="Return-Path: <".clean_msg($youremail).">\n";
        
$headers.="From: ".clean_msg($yourname)." <".clean_msg($youremail).">\n";
        
$headers.="X-Mailer: PHP/".phpversion()."\n";
        
$headers.="X-Sender: ".$_SERVER['REMOTE_ADDR']."\n";
        
$headers.="X-Priority: ".$priority."\n"
        
$headers.="MIME-Version: 1.0\n";
        
$headers.="Content-Type: multipart/mixed; boundary=\"".$boundary."\"\n";
        
$headers.="This is a multi-part message in MIME format.\n";

        
//Message
        
$message "--".$boundary."\n";
        
$message.="Content-Type: text/html; charset=\"iso-8859-1\"\n";
        
$message.="Content-Transfer-Encoding: quoted-printable\n";
        
$message.="\n";
        
$message.=clean_msg(nl2br(strip_tags($yourmessage)));
        
$message.="\n"
To this:

PHP Code:
        //Headers
        
$headers="Return-Path: <".clean_msg($myemail).">\n";
        
$headers.="From: ".clean_msg($myemail)." <".clean_msg($myemail).">\n";
        
$headers.="X-Mailer: PHP/".phpversion()."\n";
        
$headers.="X-Sender: ".$_SERVER['REMOTE_ADDR']."\n";
        
$headers.="X-Priority: ".$priority."\n"
        
$headers.="MIME-Version: 1.0\n";
        
$headers.="Content-Type: multipart/mixed; boundary=\"".$boundary."\"\n";
        
$headers.="This is a multi-part message in MIME format.\n";

        
//Message
        
$message "--".$boundary."\n";
        
$message.="Content-Type: text/html; charset=\"iso-8859-1\"\n";
        
$message.="Content-Transfer-Encoding: quoted-printable\n";
        
$message.="\n";
        
$message.="Name: ".clean_msg(strip_tags($yourname))."<br />";
        
$message.="Email: ".clean_msg(strip_tags($youremail))."<br />";
        
$message.="<br />";
        
$message.=clean_msg(nl2br(strip_tags($yourmessage)));
        
$message.="\n"
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #3  
Old 03-30-2013, 04:43 PM
Bamboozle is offline Bamboozle
Registered User

Join Date: Mar 2013
Posts: 2

Brilliant, thank you Scott
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:34 AM.




Powered by vBulletin®