06-21-2006, 08:47 AM
I am developing a little system, what verifies every setting option, what user inputs.
So, one thing, what I have to test, is SMTP. Does somebody know a good trick or snippet, how to test SMTP without sending e-mail? :p
06-21-2006, 09:03 AM
What do you need to test?
You can try Swift mailer then print_r() the "transactions" property.
This plugin would prevent it from getting as far as sending mail:
public $pluginName = 'silly';
public function loadBaseObject(&$swiftInstance)
$this->swiftInstance =& $swiftInstance;
public function onBeforeCommand()
if ($this->swiftInstance->responseCode == 354)
But in essence you just need to use fsockopen() to write to the server.
You might want to look at fakemail (sourceforge) too. It's saves mail to a file rather than sending it BUT it doesn't support any ESMTP extensions... it's a really basic SMTP only.