Does Norman's excellent SendMail patch (http://www.drillpine.biz/sellerdecks...eadoOfSMTP.txt) still work in v18/Swift and does the patching replace lines following:
And does this work for network testing?
Thank you
Code:
sub SendMail { #? ACTINIC::ASSERT($#_ >= 4, "Invalid argument count in SendMail ($#_)", __LINE__, __FILE__); # # !!!!!! This is a function commonly used by many utilities. Any changes to its interface will # !!!!!! need to be verified with the various utility scripts. # if ($#_ < 4) { return($::FAILURE, GetPhrase(-1, 12, 'Actinic::SendMail'), 0, 0); } my ($sSmtpServer, $sEmailAddress, $sLocalError, $sSubjectText, $sMessageText, $sMessageHTML, $sBoundary, $sReturnAddress); ($sSmtpServer, $sEmailAddress, $sSubjectText, $sMessageText, $sMessageHTML, $sReturnAddress) = @_; # # Check message content for bare LFs and repair if there are some # $sMessageText =~ s/\r\n/\n/g; # CRLF -> LF $sMessageText =~ s/\r/\n/g; # remaining CR -> LF $sMessageText =~ s/\n/\r\n/g; # all LF -> CRLF # and check the HTML content as well $sMessageHTML =~ s/\r\n/\n/g; # CRLF -> LF $sMessageHTML =~ s/\r/\n/g; # remaining CR -> LF $sMessageHTML =~ s/\n/\r\n/g; # all LF -> CRLF # # Check the return address # if (!$sReturnAddress) # if no return address defined { $sReturnAddress = $sEmailAddress; # use the destination email address } # (V11) use systems sendmail program my $mailer = Mail::Mailer->new(); $mailer->open({ From => $sReturnAddress, To => $sEmailAddress, Subject => $sSubjectText, }) or die "Can't open: $!\n"; print $mailer $sMessageText; $mailer->close(); return($::SUCCESS, '', 0, 0); }
Thank you
Comment