28, May 2012

"from" header in mail scripts - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: "from" header in mail scripts
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: "from" header in mail scripts  (Read 1128 times)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« on: Jun 13, 2006, 02:17:10 pm »

Hello,

what is the right way to define a "from" mail header?

Code:
<?php
$header 
"From: \"My name\" <my_email@address.com>";

or

Code:
<?php
$header 
"From: My name <my_email@address.com>";

note the double quotes...

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #1 on: Jun 13, 2006, 02:22:34 pm »

I think the second is the right one.

BTW, if you want to do something difficult with email stuff check this class. It is the best email class around.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Jun 13, 2006, 02:27:27 pm »

Thanks for the comment, I have my own php mailer class (its a more simple script without html mail at the moment) Wink

I checked the code inside phpmailer and they are using a string without quotes arround the name.

I'm asking this because my (professional) provider told me that the surrounding quotes are according the RFC recommendations.

I use the "quoteless" version too...

Edit: I think email could be a tag at this forum...

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #3 on: Jun 13, 2006, 02:33:00 pm »

It is Smiley

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2865
Tags : html forums email Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: "from" header in mail scripts
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 01:08:32 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.