<?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>Paul Maunders &#124; Web log &#187; wamp</title>
	<atom:link href="http://www.pyrosoft.co.uk/blog/tag/wamp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pyrosoft.co.uk/blog</link>
	<description>Economics, Business, Telecoms, Tech and Gadgets</description>
	<lastBuildDate>Tue, 22 Jun 2010 21:05:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>WAMP SMTP Server &#8211; Send outgoing emails</title>
		<link>http://www.pyrosoft.co.uk/blog/2009/05/20/wamp-smtp-server-send-outgoing-emails/</link>
		<comments>http://www.pyrosoft.co.uk/blog/2009/05/20/wamp-smtp-server-send-outgoing-emails/#comments</comments>
		<pubDate>Wed, 20 May 2009 09:11:01 +0000</pubDate>
		<dc:creator>Paul Maunders</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[wamp]]></category>

		<guid isPermaLink="false">http://www.pyrosoft.co.uk/blog/?p=938</guid>
		<description><![CDATA[If you are running WAMP and you want to be able to send outgoing e-mails via PHP&#8217;s mail function, then you will need to edit the php.ini file and change SMTP = localhost to SMTP = smtp.yourisp.com Replacing smtp.yourisp.com with the address of your ISP&#8217;s SMTP server, e.g. smtp.ntlworld.com. The php.ini is in the bin directory [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running WAMP and you want to be able to send outgoing e-mails via PHP&#8217;s mail function, then you will need to edit the php.ini file and change</p>
<pre>SMTP = localhost</pre>
<p>to</p>
<pre>SMTP = smtp.yourisp.com</pre>
<p>Replacing smtp.yourisp.com with the address of your ISP&#8217;s SMTP server, e.g. smtp.ntlworld.com. The php.ini is in the bin directory of the active Apache, which will be something like:</p>
<pre>c:\wamp\bin\apache\apache2.2.8\bin</pre>
<p>However, if you are using Zend Mail and you get an error along the lines of</p>
<pre>Warning: mail() [function.mail]: SMTP server response: 501 &lt;"Bill Gates" &lt;bill@microsoft.com&gt;&gt;: "@" or "." expected after """"</pre>
<p>Then you should probably bypass PHP&#8217;s mail functions altogether, and <a href="http://framework.zend.com/manual/en/zend.mail.sending.html">connect directly to the SMTP server from Zend Mail</a>:</p>
<pre>
require_once 'Zend/Mail/Transport/Smtp.php';
$tr = new Zend_Mail_Transport_Smtp('mail.example.com');
Zend_Mail::setDefaultTransport($tr);
</pre>
<p>So to send a mail from WAMP using Zend Framework&#8217;s Mail functions, you would use the following:</p>
<pre>
require_once 'Zend/Mail.php';
require_once 'Zend/Mail/Transport/Smtp.php';

$tr = new Zend_Mail_Transport_Smtp('mail.example.com');
Zend_Mail::setDefaultTransport($tr);

$mail = new Zend_Mail();
$mail->setBodyText($setBodyHtml);
$mail->setFrom('bill@microsoft.com', 'Bill Gates');
$mail->addTo($email, $name);
$mail->setSubject($subject);
$mail->send();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.pyrosoft.co.uk/blog/2009/05/20/wamp-smtp-server-send-outgoing-emails/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
