hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Sending an html header to the mail() function

Forum Jump

Sending an html header to the mail() function

Reply Post New Thread In Programming Discussion Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Join Date: Sep 2002
Posts: 14

Sending an html header to the mail() function

$header = "From: \"".addslashes($sender_name)."\" <".$sender_email.">\r\n";
$header .= "Reply-To: ".$sender_email."\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=iso-8859-1\r\n";
$header .= "X-Priority: 1\r\n";
$header .= "X-Mailer: PHP / ".phpversion()."\r\n";
$header .= "Cc: ".$other_email."\r\n";
$header .= "Bcc: ".$another_email."\r\n";

ok.. so now i add put $header into mail() but.. where do i put the content? and is it possible to add variables to the html content? go in and out of php adding the vars and going out again.. is that possible? or is there a way around it through javascript?


Sponsored Links
iNET Interactive
Join Date: May 2001
Location: Dayton, Ohio
Posts: 4,898
PHP Code:
This what you want?


Join Date: Sep 2002
Posts: 14
no.. uve put the header variable in the mail() with all the others.. we dont need that.. $header is enough for all of them.. what im asking is where can i put the content in the header variable? or do i have to add another permiter/? and can i add variables to the html email? like go in and out of php?

Sponsored Links

Related posts from
Title Type Date Posted
GHOST Vulnerability Poses Threat to Most Linux Systems Web Hosting News 2015-01-28 11:35:05
Shellshock-Based Malware Campaign Poses Threat to Mail Servers Web Hosting News 2014-10-28 15:33:56
Service Providers Push Updates to Fight OpenSSL Heartbleed Bug Web Hosting News 2014-05-01 08:31:27
Web Hosting Sales and Promos Roundup - December 6, 2013 Web Hosting News 2014-05-23 15:42:37
The Options for Blocking Outbound Spam: The Status Quo Blog 2013-06-06 14:08:10

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Web Hosting News:
WHT Membership
WHT Membership



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?