Page 1 of 1

mail function problem

Posted: Tue Mar 29, 2005 6:50 pm
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]

Posted: Tue Mar 29, 2005 7:04 pm
by feyd
set the content-type in the headers argument.

Posted: Tue Mar 29, 2005 7:21 pm
by tdelobe
ah, thanks.