AUTHOR

Jim Thomason, [email protected]

DESCRIPTION

Mail::Bulkmail::DummyServer is a drop in replacement for Mail::Bulkmail::Server.

Sometimes you just want to test things on your end - make sure your list iterates properly, make sure your mail merge is functioning fine, make sure your logging functions are correct, whatever. And in those cases, you probably don't want to worry about futzing around with your \s-1SMTP\s0 relay and sending junk messages through it that you don't care about. Not to mention the fact that those probably will need to be inspected and deleted later. A hassle for debugging.

Enter DummyServer. This is a subclass of Mail::Bulkmail::Server that behaves exactly the same except for the fact that it doesn't actually connect to a server. Instead, it sends all data that would be going to the server to a file instead. This file should be specified in the conf file.

 #in your conf file
 define package Mail::Bulkmail::DummyServer
 dummy_file     = ./my.dummy.file

Now, instead of sending commands to your \s-1SMTP\s0 relay, they'll get sent to ./my.dummy.file for easy inspection at a later date.

CLASS ATTRIBUTES

dummy_file

Stores the dummy_file that you want to output your data to.

METHODS

connect

\*(L"connects\*(R" to your DummyServer. Actually, internally it ties a filehandle onto this package. Yes, this thing has a (minimal) implementation of a tied handle class to accomplish this feat. This method is known to return MBDu001 - server won't say EHLO

disconnect

overloaded disconnect method. Wipes out the internal socket as usual, but doesn't try to say \s-1RSET\s0 or \s-1QUIT\s0 to the server. disconnect can also disconnect quietly, i.e., it won't try to issue a \s-1RSET\s0 and then quit before closing the socket. $server->disconnect(); #issues RSET and quit $server->disconnect('quietly'); #issues nothing

RELATED TO Mail::Bulkmail::DummyServer…

Mail::Bulkmail::Server

COPYRIGHT (again)

Copyright and (c) 2003 James A Thomason \s-1III\s0 ([email protected]). All rights reserved. Mail::Bulkmail::DummyServer is distributed under the terms of the Perl Artistic License.

CONTACT INFO

So you don't have to scroll all the way back to the top, I'm Jim Thomason ([email protected]) and feedback is appreciated. Bug reports/suggestions/questions/etc. Hell, drop me a line to let me know that you're using the module and that it's made your life easier. :-)