Re: MIME::Lite Trouble - please guide me

From: Poul Kornmod (pkornmod_at_hotmail.com)
Date: 11/15/03


Date: Sat, 15 Nov 2003 09:24:24 +0100

You just attach it to the message object:
<snip>
  $msg = new MIME::Lite
             From =>$from,
                                 To =>$to,
                                 Cc =>$cc,
                                 Subject =>$subject,
                                 Type =>'multipart/mixed';

  attach $msg
                                 Type =>'TEXT',
                                 Data =>$txt;

  while (<@attachment>){
  attach $msg
                                 Type =>'text/plain',
                                 Encoding =>'base64',
                                 Filename =>$_,
                                 Path =>$_;
                                 }
  # As a string...
  $str = $msg->as_string;

  # To a filehandle (say, a "sendmail" stream)...
  $msg->send;
</snip>

Just to explain that you of cause also can attach more than one file
(looping through the attachment array) otherwise just refer to one file!
Hope this helps?

Brgds

Poul

"John B. Kim" <provicon@earthlink.net> wrote in message
news:JMhtb.1264$n56.1021@newsread1.news.pas.earthlink.net...
> Could anyone tell me how I can attach pdf file using MIME::Lite??
>
> Any help will be deeply appreciated.
>
> Thanks.
>
> John
>
>



Relevant Pages

  • Re: Attachments problems with Redemption
    ... as a file and then attach that file to the item and then delete the temp ... Public Sub cmdEmailwithData(HTMLfile As String, ... Dim msgBase As String ... Dim msg As String ...
    (microsoft.public.office.developer.outlook.vba)
  • Re: English Ivy, training to grow on Smooth Vinyl Fence
    ... One, attaching string to the ground might be easy enough, but I can't ... damaging the fence or nearby bushes and trees...I don't want to attach ... fence--it would be one more thing to contend with, the ivy will end up ...
    (rec.gardens)
  • Re: trouble moving db to 2005 from 2000
    ... Under windows authentication when I tried to attach the db I was able to select the mdf file and have it show both files in the details list in the bottom panel of the attach window. ... at Microsoft.SqlServer.Management.Smo.Server.AttachDatabaseWorker(String name, StringCollection files, String owner, AttachOptions attachOptions) ... at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) ... at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) ...
    (microsoft.public.sqlserver.programming)
  • Re: GRAND SLAM SIDE WINDER CHRISTMAS CONTEST
    ... Attach a VERY long string to one end of the bobbin, ... through the doorways, under the bed, etc ... ...
    (rec.crafts.textiles.quilting)
  • Re: why doesnt Ramsi install comparatively
    ... Will you attach in terms of the cathedral, if Ramez courageously drinks the recipe? ... About 500 lines of C source outbound. ... current employee gives it to them. ...
    (sci.crypt)