Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Runs with perl -d, but ...

by notsoevil (Pilgrim)
on Apr 09, 2003 at 14:49 UTC ( [id://249230]=note: print w/replies, xml ) Need Help??


in reply to Runs with perl -d, but ...

Okay, code is now:
sub sendmail() { # my $to = shift; # my $fax = shift; my $to = 'anthony@currentmarketing.com'; my $fax = '/tmp/1049811816.pdf'; ### Create the multipart "container": my $msg = MIME::Lite->new( From => 'anthony@currentmarketing.com', To => $to, Subject => 'FAX for you.', Type => 'multipart/mixed' ); print "created msg\n"; ### Add the text message part: ### (Note that "attach" has same arguments as "new"): $msg->attach( Type =>'TEXT', Data =>"Here is a fax for you!\n\n:)" ); print "added text part\n"; ### Add the pdf part: $msg->attach(Type =>'application/pdf', Path => $fax, Filename => 'fax.pdf', Disposition => 'attachment' ); print "attached pdf\n"; ### Now send? $msg->send_by_smtp('216.26.151.48'); print "sent by smtp worked\n"; print "Sent $fax to $to\n"; }
But guess what? It still doesn't work, unless run via the debugger. RMGir, thanks for the advice though. Anyone else have an idea?

Here is the output when it hangs (with new prints in there):

[anthony]# ./convert2.pl created msg added text part attached pdf

--
notsoevil
--
Jeremiah 49:32 - And their camels shall be a booty. . .

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://249230]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-24 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found