?
Solved

How to send attachment as zip file in perl?

Posted on 2009-04-15
3
Medium Priority
?
348 Views
Last Modified: 2013-11-17
Hi,
I have this part of code where I need to enable sending file as zip attachment in perl.

if ($func =~ /email (.*)/) {
      $send_email = 1;
      $subject = "Mail from  Servers";
      $attach = 1;
        @RECIP = split /,/, $1;
#      push @RECIP, $1;

      while (<STDIN>) {
            $out .= $_;      
      }

Regards,
Naseer

if ($func =~ /email (.*)/) {
	$send_email = 1;
	$subject = "Mail from  Servers";
	$attach = 1;
        @RECIP = split /,/, $1;
#	push @RECIP, $1;
 
	while (<STDIN>) {
		$out .= $_;	
	}

Open in new window

0
Comment
Question by:naseer6679
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Assisted Solution

by:marchent
marchent earned 450 total points
ID: 24147552
0
 
LVL 39

Assisted Solution

by:Adam314
Adam314 earned 450 total points
ID: 24148339
The code you posted does not send the e-mail.  You could use the MIME::Lite module to handle this:
    http://search.cpan.org/~rjbs/MIME-Lite-3.024/lib/MIME/Lite.pm
0
 
LVL 48

Accepted Solution

by:
Tintin earned 600 total points
ID: 24151859
MIME::Lite is the usual way most people use for sending attachments.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question