help!!! 
Author Message
 help!!!

I'm an Italian programmer.
I'm trying to make a webmail program, but i'm not very expert with perl
language and so i have some problems.
The first problem is this:
I'm searching for an example of a script using the modul Mime::Lite.
Does somebody can post me a simple to send some text and a file attachment?
Please help me!!!!!

I'm sorry for my english...........is it very bad???

Ciao
Nicola



Sun, 16 Feb 2003 03:00:00 GMT  
 help!!!

Quote:
> I'm searching for an example of a script using the modul Mime::Lite.
> Does somebody can post me a simple to send some text and a file attachment?

were the examples in the module documentation not good enough for
you?

--
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>



Sun, 16 Feb 2003 03:00:00 GMT  
 help!!!
Your English is fine.  Use MIME::Entity, it rocks.
Do this:

use MIME::Entity;
use LWP::MediaTypes;

      my $top=build MIME::Entity
         From    => $username,
         To      => $recipient,
         CC      => $cc,
         Bcc     => $bcc,
         Subject => $subject,
         Data    => $body;
      if ($attachment) {
         my $type=guess_media_type($attachment);
         my $encoding=index($type,'text/')==0 ? 'quoted-printable' : 'base64';
         $top->attach(
            Data     => $data,
            Type     => $type,
            Encoding => $encoding
         );
      }
      $top->sync_headers(Length=>'COMPUTE');
      if (open(MAIL,"| /usr/lib/sendmail -t -i")) {
         $top->print(\*MAIL);
         close MAIL;
         print "Message sent to $P::recipient";
      } else {
         print "Error running sendmail: $!";
      }

Hope this helps,

Steve

Quote:

> I'm an Italian programmer.
> I'm trying to make a webmail program, but i'm not very expert with perl
> language and so i have some problems.
> The first problem is this:
> I'm searching for an example of a script using the modul Mime::Lite.
> Does somebody can post me a simple to send some text and a file attachment?
> Please help me!!!!!

> I'm sorry for my english...........is it very bad???

> Ciao
> Nicola



Thu, 20 Feb 2003 19:13:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP HELP HELP HELP HELP

2. ****** HELP HELP HELP ******

3. help .. help help

4. Help Help Help!!!!

5. Help Help Help!!!

6. Help...Help, install failed, please help!!

7. Help Help Please Help !

8. help help help please!!!!

9. HELP HELP HELP!!! - with function call parameters

10. please, help me, help me, help me.....

11. Announcing: The Perl Institute: Helping people help Perl help people

12. Help Help Help!!!

 

 
Powered by phpBB® Forum Software