Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

character codes

Status
Not open for further replies.

coicle

Programmer
Joined
Sep 25, 2003
Messages
8
Location
GB
Hi,
I am trying to include some characters, &quot;<&quot;(arrow) being one of them and the other &quot;&quot;&quot;(speech mark). How do I put them in in PhP? cos my mail out just doesn't send when i write them in.

mail($ToName.&quot; <&quot;.$ToEmail.&quot;>&quot;,$ToSubject, $Message, &quot;From: &quot;.$FromName.&quot; <&quot;.$FromEmail.&quot;>&quot;);

:'(

cheers,
dan
 
You can't include the full name and address in the &quot;to&quot; parameter to mail(), only the email address. Instead, use the &quot;additional headers&quot; parameter to include the &quot;To:&quot; header with the recipients full name.

To include a double quote in a string, surround it by single quotes:

$foo = 'value = &quot;' . $thevalue . &quot;\n&quot;;



I will also give my general advice to anyone who is looking to create more complex emails: Take a look at PHPMailer,
Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top