Adding basic per instance mailing configuration.

This commit is contained in:
Martin Kamerbeek 2010-05-19 17:06:18 +02:00
parent f8cb8cd05a
commit 04f39ebc19
5 changed files with 104 additions and 8 deletions

View file

@ -150,8 +150,9 @@ sub send {
#### TODO: Error checking
my $mailing = $self->getMailing;
my $configuration = $mailing->get('configuration') || {};
my $asset = $mailing->getAsset;
my $content = $asset->processContentAsUser( $mailing->get('issueId'), $self->get('userId') );
my $content = $asset->processContentAsUser( $mailing->get('issueId'), $self->get('userId'), $configuration );
my $body = $self->absolutifyURIs( $content, $asset->getUrl );
# Mail is a test mail but there is noone to send the result to
@ -169,7 +170,7 @@ sub send {
}
# Fetch subject
my $subject = '[TEST] Subject selection still needs to be implemented.';
my $subject = $asset->getSubject( $configuration );
my $messageId = $id->toHex( $self->getId );
my $domain = $session->setting->get( 'newsletterReturnDomain' );
@ -187,7 +188,6 @@ sub send {
# And send it.
my $success = $mail->send;
$session->log->warn( "Sending email to [$to]" );
if ( $success ne '1' ) {
$self->error( "Mail couldn't be sent by WebGUI::Mail::Send" );
}