in reply to Capturing Email During Testing
I just have the following two line in my code and I toggle the comment depending on whether I'm testing or not:
If you can't toggle the comments, you can change the network. Add an entry in /etc/hosts (or whatever your equivalent is) so "real.smtp.server.net" resolves to localhost and use fakemail running on port 25.MIME::Lite->send( smtp => 'real.smtp.server.net' ) ; # MIME::Lite->send( smtp => 'localhost:10025' ) ;
Although that might just confirm: "There's more than one way to do it" doesn't always mean there's more than one way you should do it.
|
|---|