Link to home
Start Free TrialLog in
Avatar of tanc02
tanc02

asked on

PERL in Win32

Where can I find Attachment module for Sendmail ?
ASKER CERTIFIED SOLUTION
Avatar of guadalupe
guadalupe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tanc02
tanc02

ASKER

do you mind give me the whole URL to that site ?
Avatar of tanc02

ASKER

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 !
Avatar of tanc02

ASKER

Adjusted points to 50
Avatar of tanc02

ASKER

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 !


    # 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';
Avatar of tanc02

ASKER

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 .
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";