Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Mail Sending me mad

by jorg (Friar)
on Dec 15, 2000 at 20:48 UTC ( [id://46848]=note: print w/replies, xml ) Need Help??


in reply to Mail Sending me mad

Hi, I looked into sending xls files as attachment and stumbled across the beforementioned MIME::Lite module. It took me about 10 minutes to get the whole thing working. Here's a code snippet from the docs to show you the simplicity of the module
use strict; use MIME::Lite; use Getopt::Std; #------------------------------ # main #------------------------------ sub main { my %opts; my $gif = $ARGV[0] || die "usage error: missing GIF path\n"; ### Create a new multipart message: my $msg = MIME::Lite->new(From => 'me@myhost.com', To => 'you@yourhost.com', Subject =>'Test the "attach to singlepart" hack', Type => 'TEXT', Data => ["This is a simple text message... ", "can we attach a file to it?\n"]); ### Attach a part: $msg->attach(Type => 'image/gif', Path => $gif); ### Output! $msg->print; } exit (&main ? 0 : -1);
hope this helps ...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-23 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found