Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

ZIP and Email attachments

by kalyanrajsista (Scribe)
on Jan 28, 2010 at 11:48 UTC ( #820136=perlquestion: print w/replies, xml ) Need Help??
kalyanrajsista has asked for the wisdom of the Perl Monks concerning the following question:

Hello all

I'm trying to understand the better way of sending email attachments. I'm using MIME::Lite Perl module. I'm generating lots of files which are more than 2MB which are sent to the customers. I understand that if file size grows bigger and bigger, my mailing server may reject the mails. Is there any efficient way of sending large attachments

Replies are listed 'Best First'.
Re: ZIP and Email attachments
by marto (Archbishop) on Jan 28, 2010 at 11:55 UTC

    Mail servers both outbound and inbound may have such size limits. As far as outbound goes you should be able to check this or ask your sysadmin. You have no way of guaranteeing the size limit of a target mail system, or if a particular user has any inbox size limits.

    You could attempt to compress files before sending or send them a link to download the file via http/https, perhaps requiring them to login via a suitable authentication mechanism.

    Updated: Added 'such' in first sentence.

Re: ZIP and Email attachments
by zentara (Archbishop) on Jan 28, 2010 at 14:42 UTC
    What you should do is get an internet account that gives you ssh access to your account. Then you can upload your huge file 1 time to your home directory, ssh into it, and mail out your attachments from the remote host. Accounts that give you reliable ssh access and mail rights, probably can be had for less than $20 per month

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku
      No, what you should really do is to get your customer to sign up to an email address on your server. Or, even better, give them a login to your machine, then they can just download the files. No, I've got it, have them physically relocate to your office. Then you can just read the file out to them from screen. That makes much more sense than this.
        You do it your way, I'll do it mine.... ain't Perl great? If the OP really needs to deliver his content via the email inbox, then he needs to get a better ISP account. Http links in an email, may never get clicked... so can you be sure they ever received it?

        I'm not really a human, but I play one on earth.
        Old Perl Programmer Haiku

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://820136]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2018-06-24 02:25 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.