Skip to content

Commit

Permalink
Send emails to var/tmp/mail in development
Browse files Browse the repository at this point in the history
  • Loading branch information
rwstauner committed Jun 21, 2014
1 parent 43c78e5 commit 4d470f0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app.psgi
@@ -1,5 +1,17 @@
use strict;
use warnings;

use FindBin;
use lib "$FindBin::RealBin/lib";

if ( $ENV{PLACK_ENV} eq 'development' ) {

# In development send emails to a directory.
if ( !$ENV{EMAIL_SENDER_TRANSPORT} ) {
$ENV{EMAIL_SENDER_TRANSPORT} = 'Maildir';
$ENV{EMAIL_SENDER_TRANSPORT_dir} = "$FindBin::RealBin/var/tmp/mail";
}
}

# The class has the Plack initialization and returns the app.
require MetaCPAN::Server;

0 comments on commit 4d470f0

Please sign in to comment.