Add mail style template override.
This commit is contained in:
parent
bcaa3f87b3
commit
63798b98f1
1 changed files with 14 additions and 1 deletions
|
|
@ -25,6 +25,12 @@ sub definition {
|
||||||
my $i18n = WebGUI::International->new( $session,'AssetAspect_Mailable' );
|
my $i18n = WebGUI::International->new( $session,'AssetAspect_Mailable' );
|
||||||
|
|
||||||
tie my %properties, 'Tie::IxHash', (
|
tie my %properties, 'Tie::IxHash', (
|
||||||
|
mailStyleTemplateId => {
|
||||||
|
fieldType => 'template',
|
||||||
|
label => 'Mail template',
|
||||||
|
tab => 'mailable',
|
||||||
|
namespace => 'style',
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
push( @{ $definition }, {
|
push( @{ $definition }, {
|
||||||
|
|
@ -73,8 +79,15 @@ sub processContentAsUser {
|
||||||
$session->user( { userId => $userId } );
|
$session->user( { userId => $userId } );
|
||||||
$session->log->preventDebugOutput;
|
$session->log->preventDebugOutput;
|
||||||
|
|
||||||
|
my $styleTemplateId =
|
||||||
|
$self->get('mailStyleTemplateId')
|
||||||
|
|| $self->get('styleTemplateId');
|
||||||
|
|
||||||
# Generate email body for this user
|
# Generate email body for this user
|
||||||
my $content = $self->generateEmailContent;
|
my $content = $session->style->process(
|
||||||
|
$self->generateEmailContent,
|
||||||
|
$styleTemplateId,
|
||||||
|
);
|
||||||
|
|
||||||
# Process macros
|
# Process macros
|
||||||
WebGUI::Macro::process( $session, \$content );
|
WebGUI::Macro::process( $session, \$content );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue