Leslie_jones has asked for the wisdom of the Perl Monks concerning the following question:
My basic problem that I seek wisdom with is, how do I get at the successful server response? Warm and kind regards Lesliesub sendmsg { my $mx_record = shift; my $sender = shift; my $recipient = shift; my $subject = shift; my $messagebody = shift; my $message; my $result; $message = MIME::Lite->new( Subject => $subject, To => $recipient, From => $sender, Type => 'text/html', Data => $messagebody ); $message->replace("X-Mailer" => "Perl Mailer Override"); $message->add("X-Antiabuse" => ["anti abuse tracking", "cid:12 +34", "ccid:5678"]); MIME::Lite->send('smtp', $mx_record, Hello => 'example.com', T +imeout => 20); # Send the message eval{$message->send}; if($@) { $result = "ERROR from MX: $mx_record\n$@\n"; } else { $result = "OK from MX: $mx_record\n"; } return $result; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MIME::Lite 250 OK QUEUE ID???
by ig (Vicar) on Oct 15, 2010 at 15:23 UTC | |
|
Re: MIME::Lite 250 OK QUEUE ID???
by Anonymous Monk on Oct 15, 2010 at 10:56 UTC | |
by Leslie_jones (Initiate) on Oct 15, 2010 at 14:20 UTC | |
by Anonymous Monk on Oct 15, 2010 at 14:41 UTC | |
by ig (Vicar) on Oct 15, 2010 at 15:33 UTC | |
by Leslie_jones (Initiate) on Oct 16, 2010 at 08:25 UTC | |
by Anonymous Monk on Oct 16, 2010 at 09:08 UTC | |
|