PERL in Win32

Where can I find Attachment module for Sendmail ?
LVL 1
tanc02Asked:
Who is Participating?
 
guadalupeConnect With a Mentor Commented:
Goto cpan and get MIME-Lite, it will handle all your attachment needs.
0
 
tanc02Author Commented:
do you mind give me the whole URL to that site ?
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
tanc02Author Commented:
ok, I saw the document, but can you tell me how to use this :

  attach $msg Type     =>'image/gif',
                      Path     =>'aaa000123.gif',
                    Filename =>'logo.gif';

Can you write a simple html or perl that can
send an attachment . Points will increase to 50.

Thanks !
0
 
tanc02Author Commented:
Adjusted points to 50
0
 
tanc02Author Commented:
ok, I saw the document, but can you tell me how to use this :

  attach $msg Type     =>'image/gif',
                      Path     =>'aaa000123.gif',
                    Filename =>'logo.gif';

Can you write a simple html or perl that can
send an attachment . Points will increase to 50.

Thanks !
0
 
guadalupeCommented:


    # Create a new multipart message:
    $msg = new MIME::Lite
                From    =>'me@myhost.com',
                To      =>'you@yourhost.com',
                Cc      =>'some@other.com, some@more.com',
                Subject =>'A message with 2 parts...',
                Type    =>'TEXT',
                Data    =>"Here's the GIF file you wanted";  
   
    # Attach a part:
    attach $msg Type     =>'image/gif',
                Path     =>'aaa000123.gif',
                Filename =>'logo.gif';
0
 
tanc02Author Commented:
Sorry ! I should make my point clear.



   attach $msg Type     =>'image/gif',
                       Path     =>'aaa000123.gif',
                     Filename =>'logo.gif';

the attachment is fixed based on above script, right ?
What I want is I can select the file. Like I hit the browse button, then an 'open' window will pop out
and from that open window, I can select the file .
0
 
guadalupeCommented:
Uploading a file is a whole other question but once you have it on your local file system and can identify it do this:

$filepath = "some_path";

$filename = "some_name";

Then:

attach $msg Type     =>'image/gif',
                       Path     =>"$filepath",
                     Filename =>"$filename";

0
All Courses

From novice to tech pro — start learning today.