Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Web Design & Development
Tag Cloud
access audio black screen blue screen boot bsod connection crash desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor ram recovery router safe mode screen slow sound spyware tdlwsp.dll trojan vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
html e-mail with php mail

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
alex_sandro's Avatar
Junior Member with 8 posts.
 
Join Date: Aug 2009
Experience: Intermediate
09-Nov-2009, 11:06 AM #1
html e-mail with php mail
I am using php mail function to send e-mails to several addresses. But I have no idea how to send HTML e-mails in the same way.

for example:
Code:
<?php
$to = "client@domain.com";
$subject = "your Subscription";
$message = "Hello! This is a simple email message.";
$from = "me@domain.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
what should I do to send HTML e-mails using similar script?
midders's Avatar
Account Closed with 654 posts.
 
Join Date: Dec 1969
09-Nov-2009, 12:57 PM #2
You need to use the Content-Type keyword in the email header, then just send HTML code in the body.

Code:
Content-Type: text/html; charset=iso-8859-1
Slainte

midders
Reply Bookmark and Share

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 11:31 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.