#!/usr/bin/perl -w use strict; use warnings; use Mail::Sender; my $smtp = "mail"; my $from = "nwatson\@mydomain.com"; my $ticketad = "fakefrom\@mydomain.com"; my $sender = new Mail::Sender; $sender->Open({ smtp =>$smtp, to =>$from, from =>$ticketad, #fake_from =>$ticketad, subject =>"Reply from mydomain for TEST", headers => "Errors-To: postmaster\@mydomain.com"}); die "Error: $Mail::Sender::Error\n" unless ref $sender; $sender->Body; $sender->SendLineEnc(<<"*END*"); Your support request has been received by mydomain Staff Support and w +ill be tracked as specified in the subject line of this email. When contacting us regarding this issue: 1) Please use the above subject line, or, ensure the full ticket ID, e +.g. is included in the subject line, for any emails regarding this pa +rticular issue. 2) All email should be directed to vgsupport\@mydomain.com for trackin +g purposes. -------------------- -------------------- Thank you, mydomain Staff Support *END* $sender->Close or die "Failed to send the message: $sender->{error_msg +}, $Mail::Sender::Error\n";
The script is returning this error: Failed to send the message: Connection not established, Connection not established
On the SMTP side this is in syslog:
collect: premature EOM: Error 0 collect: unexpected close on connection from endor.mydomain.com,
Anyone have any idea?
Neil Watson
watson-wilson.ca
In reply to New Mail::Sender not working? by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |