<?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/"
	>

<channel>
	<title>Dream House &#187; mail forwader</title>
	<atom:link href="http://sajjadhossain.com/tag/mail-forwader/feed/" rel="self" type="application/rss+xml" />
	<link>http://sajjadhossain.com</link>
	<description>Courage to do something...</description>
	<lastBuildDate>Wed, 18 Aug 2010 17:39:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>cPanel: Class for creating email account and mail forwarder</title>
		<link>http://sajjadhossain.com/2008/07/15/cpanel-class-for-creating-email-account-and-mail-forwarder/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://sajjadhossain.com/2008/07/15/cpanel-class-for-creating-email-account-and-mail-forwarder/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 09:49:44 +0000</pubDate>
		<dc:creator>Mohammad Sajjad Hossain</dc:creator>
				<category><![CDATA[My Works]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[cpanel class]]></category>
		<category><![CDATA[mail creator]]></category>
		<category><![CDATA[mail forwader]]></category>

		<guid isPermaLink="false">http://sajjadhossain.com/?p=45</guid>
		<description><![CDATA[This class can be used to create email account and mail forwarders using PHP, without logging to cPanel. It is an extension of script made by www.zubrag.com. You can access the original link from here http://www.zubrag.com/scripts/cpanel-create-email-account.php. And it is also a modified version of the class &#8220;cpmail&#8221; which was coded by Md. Zakir Hossain (Raju), [...]


Related posts:<ol><li><a href='http://sajjadhossain.com/2008/04/24/paging-class-using-php-and-mysql/' rel='bookmark' title='Permanent Link: Paging Class using PHP and MySQL'>Paging Class using PHP and MySQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-116" title="cpanel_logo" src="http://sajjadhossain.com/wp-content/uploads/2008/07/cpanel_logo.jpg" alt="cpanel logo cPanel: Class for creating email account and mail forwarder" width="190" height="90" />This class can be used to create email account and mail forwarders using PHP, without logging to cPanel.  It is an extension of script made by www.zubrag.com. You can access the original link from here http://www.zubrag.com/scripts/cpanel-create-email-account.php. And it is also a modified version of the class &#8220;cpmail&#8221; which was coded by Md. Zakir Hossain (Raju), http://www.rajuru.xenexbd.com.  <strong>How to configure:</strong></p>
<ol>
<li><a title="Download cPanel Manager" href="http://sajjadhossain.com/wp-content/uploads/2008/07/cpmailmanager10.rar#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Download</a> the zipped file.</li>
<li>Unzip the file. This file contains the class file and an example file.</li>
<li>Open the class file and change these variables -
<ul>
<li>$currentTheme &#8211; Your cPanel theme</li>
<li>$userName &#8211; Your cPanel user name</li>
<li>$password &#8211; Your cPanel password</li>
<li>$domain &#8211; Your cPanel domain</li>
<li>$cPanelPort &#8211; Your cPanel port [optional]</li>
</ul>
</li>
<li>Include the class in the file where you want to use it.</li>
</ol>
<p><strong>Example:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// include the class file</span>
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class.cpmailmanager.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// create an instanse of the class</span>
<span style="color: #000088;">$cp</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CPMailManager<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// create an email account</span>
<span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">createEmail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sadat'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'sadat123'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">status</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//account created successfully</span>
<span style="color: #009900;">&#123;</span>
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Mail created successfully'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #009900;">&#123;</span>
     <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">message</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// create mail forwarder</span>
<span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">createForwarder</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sadat'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'msh@example.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">''</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">message</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// delete mail forwarder</span>
<span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">deleteForwarder</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sadat'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'msh@example.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">''</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">message</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// delete email account</span>
<span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">deleteEmail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sadat'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">''</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$cp</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">message</span><span style="color: #339933;">;</span></pre></div></div>

<p><a title="cPanel Mail Manager" href="http://sajjadhossain.com/wp-content/uploads/2008/07/cpmailmanager10.rar#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img class="alignleft size-full wp-image-6" style="float: left;" src="http://sajjadhossain.com/wp-content/uploads/2008/01/download.gif" alt="download cPanel: Class for creating email account and mail forwarder" width="95" height="20" title="cPanel: Class for creating email account and mail forwarder" /></a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sajjadhossain.com/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://sajjadhossain.com/2008/04/24/paging-class-using-php-and-mysql/' rel='bookmark' title='Permanent Link: Paging Class using PHP and MySQL'>Paging Class using PHP and MySQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://sajjadhossain.com/2008/07/15/cpanel-class-for-creating-email-account-and-mail-forwarder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
