X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FMisc.pm;h=efad2dfd6027bc5eae5af55a87b1027ca7892778;hp=1f951595aa9a98b105d143e1efa6d0830285d38d;hb=649ceeca76084d16d22013124bd7f80f053d75c4;hpb=f012a5c9f502bc480414686b44c41df0b27c8b2f diff --git a/FS/FS/Misc.pm b/FS/FS/Misc.pm index 1f951595a..efad2dfd6 100644 --- a/FS/FS/Misc.pm +++ b/FS/FS/Misc.pm @@ -77,9 +77,16 @@ sub send_email { my $smtpmachine = $conf->config('smtpmachine'); $!=0; - $message->smtpsend( 'Host' => $smtpmachine ) - or $message->smtpsend( Host => $smtpmachine, Debug => 1 ) - or return "can't send email to $to via server $smtpmachine with SMTP: $!"; + + my $rv = $message->smtpsend( 'Host' => $smtpmachine ) + or $message->smtpsend( Host => $smtpmachine, Debug => 1 ); + + if ($rv) { #smtpsend returns a list of addresses, not true/false + return ''; + } else { + return "can't send email to $to via server $smtpmachine with SMTP: $!"; + } + } =head1 BUGS