mail function problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tdelobe
Forum Commoner
Posts: 41
Joined: Thu Aug 07, 2003 2:28 pm
Location: washington, dc

mail function problem

Post by tdelobe »

I am trying to send an email using the mail function below, but it prints out the A tag html code instead of rendering it as a link. How do you adjust the code to send an html email?

Code: Select all

mail("test@test.com", "Subject Line Here", 
"The following information was submitted by $name on $today

---------------------------

Name: $name
Title: $title
Company: $company
Phone: $phone
Email: $email
Headline: <a href=$url>$headline</a>

");

feyd | Please review how to post code using

Code: Select all

and

Code: Select all

tags. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

set the content-type in the headers argument.
tdelobe
Forum Commoner
Posts: 41
Joined: Thu Aug 07, 2003 2:28 pm
Location: washington, dc

Post by tdelobe »

ah, thanks.
Post Reply