Very curious about this one -- enough so that this is my first post at the Monastery in a LONG time.
Anyway, I have the following bit of code (which is in the sub &sendmail):
my $to = 'firstname.lastname@example.org';
my $fax = '/tmp/1049811816.pdf';
# Start with a simple text message:
my $msg = MIME::Lite->new(
Subject =>'FAX for you.',
Data =>"Here is a fax for you!\n\n:)"
print "created msg\n";
# Attach a part ... the make the message a multipart automatically:
print "attached pdf\n";
# Now send?
print "sent by smtp worked\n";
print "Sent $fax to $to\n";
When I run it via the command line, I get the following output:
[notsoevil@dragon anthony]# ./convert2.pl
It's hanging before the send, so to help see why I run perl -d:
[notsoevil@dragon anthony]# perl -d convert2.pl
Default die handler restored.
Loading DB routines from perl5db.pl version 1.07
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
sent by smtp worked
Sent /tmp/1049811816.pdf to email@example.com
Debugged program terminated. Use q to quit or R to restart,
use O inhibit_exit to avoid stopping after program termination,
h q, h R or h O to get additional info.
Er, so it runs via the perl debugger, but not normally via the command line.
If I comment out the 'attach' section and just send the text, it does run from the command line. So, needless to say, I'm now totally confused.
Jeremiah 49:32 - And their camels shall be a booty. . .