News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Adrian Schneider' Blog:
Testing Zend_Mail
February 15, 2010 @ 11:09:56

In needing to test some mailing functionality in his application Adrian Schneider has come across two ways to handle it on a machine that may not have mail up and configured correctly - mail a mail transport class or sent up a pseudo mail server.

I think a staging environment is more appropriate to actually have email being sent out. Nevertheless, it has made testing any email functionality a little cumbersome. I've done a little research, and have found two ways to tackle the problem. I've also included code samples and other resources to get you started.

The first method - the transport class - uses the Zend_Mail_Transport component (and interfaces) to set the transport for the application and handle the routing from an extension of the Abstract class. The second method involves changes to system settings in the php.ini and adding in a simple script to force a forward to the right address. Windows users can also use fakemail to accomplish a similar thing.

1 comment voice your opinion now!
test zendmail transport phpini fakemail tutorial


blog comments powered by Disqus

Similar Posts

Oracle Technology Network: DeployPHP Series, Part 5 - Zend Core for Oracle Quick Start

Christian Schaefer's Blog: Using Zend Framework components in a Symfony2 project

Abhinav Singh's Blog: How to use locks in PHP cron jobs to avoid cron overlaps

The Bakery: Seven New Articles/Tutorials

ParanoidFerret.com: Using Flex, PHP, and JSON to Modify a MySQL Database


Community Events





Don't see your event here?
Let us know!


interview laravel install community composer opinion podcast language series library update symfony security introduction release version framework tool package voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework