<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Linux basic commands &#187; PHP Programing</title>
	<atom:link href="http://linuxbasiccommands.wordpress.com/category/php-programing/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxbasiccommands.wordpress.com</link>
	<description>The simple and basic linux commands, explained for dummies.</description>
	<lastBuildDate>Fri, 27 Mar 2009 21:35:07 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='linuxbasiccommands.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/151cbdacc6c917df3e67b877b49e2963?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Linux basic commands &#187; PHP Programing</title>
		<link>http://linuxbasiccommands.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://linuxbasiccommands.wordpress.com/osd.xml" title="Linux basic commands" />
		<item>
		<title>PHP Email Headers &#8211; PHP Mail Function headers</title>
		<link>http://linuxbasiccommands.wordpress.com/2008/09/02/php-email-headers-php-mail-function-headers/</link>
		<comments>http://linuxbasiccommands.wordpress.com/2008/09/02/php-email-headers-php-mail-function-headers/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 17:42:21 +0000</pubDate>
		<dc:creator>Romania-Turistica.ro</dc:creator>
				<category><![CDATA[PHP Programing]]></category>

		<guid isPermaLink="false">http://linuxbasiccommands.wordpress.com/?p=8</guid>
		<description><![CDATA[PHP Mail Function headers
Headers are the parts seen at the top of emails. Typically :



To :
A comma seperated list of recipient emails.


From :
The senders email address.


Reply-To :
The email address where replies should be sent to.


Return-Path :
Kinda the same thing as the Reply-To. Some email clients require this, others create a default.


Subject :
Subject of the email.


CC :
Carbon [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxbasiccommands.wordpress.com&blog=3370958&post=8&subd=linuxbasiccommands&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>PHP Mail Function headers</p>
<p>Headers are the parts seen at the top of emails. Typically :</p>
<table border="0" width="96%">
<tbody>
<tr>
<td width="20%">To :</td>
<td>A comma seperated list of recipient emails.</td>
</tr>
<tr>
<td>From :</td>
<td>The senders email address.</td>
</tr>
<tr>
<td>Reply-To :</td>
<td>The email address where replies should be sent to.</td>
</tr>
<tr>
<td>Return-Path :</td>
<td>Kinda the same thing as the Reply-To. Some email clients require this, others create a default.</td>
</tr>
<tr>
<td>Subject :</td>
<td>Subject of the email.</td>
</tr>
<tr>
<td>CC :</td>
<td>Carbon Copy. A comma seperated list of more recipients that will be seen by all other recipients.</td>
</tr>
<tr>
<td>BCC :</td>
<td>Blind Carbon Copy. A comma seperated list of more recipients that will not be seen by any other recipients.</td>
</tr>
</tbody>
</table>
<p>The TO and SUBJECT filds are the first and second variables in the MAIL command. The extra headers seen above can be entered as a 4th variable in the MAIL command.</p>
<p>&lt;?php<br />
mail(&#8220;yourplace@somewhere.com&#8221;,&#8221;My email test.&#8221;,&#8221;Hello, how are you?&#8221;,&#8221;From: myplace@here.com\r\nReply-To: myplace2@here.com\r\nReturn-Path: myplace@here.com\r\nCC: sombodyelse@noplace.com\r\nBBC: hidden@special.com\r\n&#8221;);<br />
?&gt;<br />
Looks kinda messy when it&#8217;s all in there without using variables. That above example has all of the extra headers being declared. You may specify all or some or none as you desire. There are 2 very important things to note here :</p>
<table border="0" width="96%">
<tbody>
<tr>
<td width="10%" valign="top">1.</td>
<td>These headers need their NAMES: shown unlike the first three variables in the mail command. The header names are CaSe SeNsItIvE. Use per example.</td>
</tr>
<tr>
<td width="10%" valign="top">2.</td>
<td>Each header is ended with the Return and Newline characters. <span style="color:#ff0000;">\r\n</span> There are no spaces between each header.</td>
</tr>
</tbody>
</table>
<p>For better organization, these extra headers can be declared in a variable string like our previous examples.</p>
<div class="clsEX">&lt;?php<br />
$to = &#8220;yourplace@somewhere.com&#8221;;<br />
$subject = &#8220;My email test.&#8221;;<br />
$message = &#8220;Hello, how are you?&#8221;;</p>
<p>$headers = &#8220;From: myplace@here.com\r\n&#8221;;<br />
$headers .= &#8220;Reply-To: myplace2@here.com\r\n&#8221;;<br />
$headers .= &#8220;Return-Path: myplace@here.com\r\n&#8221;;<br />
$headers .= &#8220;CC: sombodyelse@noplace.com\r\n&#8221;;<br />
$headers .= &#8220;BCC: hidden@special.com\r\n&#8221;;</p>
<p>if ( mail($to,$subject,$message,$headers) ) {<br />
   echo &#8220;The email has been sent!&#8221;;<br />
   } else {<br />
   echo &#8220;The email has failed!&#8221;;<br />
   }<br />
?&gt;</p></div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/linuxbasiccommands.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/linuxbasiccommands.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxbasiccommands.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxbasiccommands.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxbasiccommands.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxbasiccommands.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxbasiccommands.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxbasiccommands.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxbasiccommands.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxbasiccommands.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxbasiccommands.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxbasiccommands.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxbasiccommands.wordpress.com&blog=3370958&post=8&subd=linuxbasiccommands&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://linuxbasiccommands.wordpress.com/2008/09/02/php-email-headers-php-mail-function-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/18611e098c933208a58658b8452eb95f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Romania-Turistica.ro</media:title>
		</media:content>
	</item>
	</channel>
</rss>