added missing ssmtp support in sendMessage

This commit is contained in:
mdrush 2016-08-27 13:10:39 -07:00
parent 69461a7c1b
commit 574390730a
1 changed files with 23 additions and 2 deletions

View File

@ -914,9 +914,30 @@ sub sendMessage
);
}
### Send the Message
if ( $Config{ZM_SSMTP_MAIL} ){
my $ssmtp_location = $Config{ZM_SSMTP_PATH};
if( ! $ssmtp_location ){
$ssmtp_location = qx('which ssmtp');
if ( logDebugging() )
{
Debug( "which ssmtp: $ssmtp_location - set ssmtp path in options to suppress this message\n" );
}
}
$mail->send( 'sendmail', $ssmtp_location, $Config{ZM_MESSAGE_ADDRESS} );
}else{
MIME::Lite->send( "smtp", $Config{ZM_EMAIL_HOST}, Timeout=>60 );
$mail->send();
}
}
else
{
my $mail = MIME::Entity->build(