<%INIT>
my $ARGSRef = $ARGS{'ARGSRef'};
my %mandatoryFields = RT->Config->Get('MandatoryFields');
if ( (defined($$ARGSRef{'id'}) and $$ARGSRef{'id'} eq 'new') ) {
## Message details
    if ( (exists $mandatoryFields{'Requestors'}) && ($mandatoryFields{'Requestors'} eq 'true') && ( (!$$ARGSRef{'Requestors'}) || ($$ARGSRef{'Requestors'} =~ /^[ \t]*$/) ) ) {
        $$skip_create = 1;
        push @{$results}, loc('Error: empty requestors');
    }
    if ( (exists $mandatoryFields{'Cc'}) && ($mandatoryFields{'Cc'} eq 'true') && ( (!$$ARGSRef{'Cc'}) || ($$ARGSRef{'Cc'} =~ /^[ \t]*$/) ) ) {
        $$skip_create = 1;
        push @{$results}, loc('Error: empty cc');
    }
    if ( (exists $mandatoryFields{'Subject'}) && ($mandatoryFields{'Subject'} eq 'true') && ( (!$$ARGSRef{'Subject'}) || ($$ARGSRef{'Subject'} =~ /^[ \t]*$/) ) ) {
        $$skip_create = 1;
        push @{$results}, loc('Error: empty subject');
    }
    if ( (exists $mandatoryFields{'Content'}) && ($mandatoryFields{'Content'} eq 'true') && ( (!$$ARGSRef{'Content'}) || ($$ARGSRef{'Content'} =~ /^[ \t]*$/) ) ) {
        $$skip_create = 1;
        push @{$results}, loc('Error: empty content');
    }
    if ( (exists $mandatoryFields{'Attach'}) && ($mandatoryFields{'Attach'} eq 'true') && ( (!$$ARGSRef{'Attach'}) || ($$ARGSRef{'Attach'} =~ /^[ \t]*$/) ) ) {
        $$skip_create = 1;
        push @{$results}, loc('Error: empty attach');
    }
}
</%INIT>
<%ARGS>
$skip_create => undef
$results => undef
</%ARGS>
