Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Sending An Attachment Using Net::SMTP

by melsael (Initiate)
on Aug 26, 2014 at 07:20 UTC ( [id://1098581]=note: print w/replies, xml ) Need Help??


in reply to Re: Sending An Attachment Using Net::SMTP
in thread Sending An Attachment Using Net::SMTP

To make encoding to base64 better, use a chunk/buffer that is a multiple of 57 bytes. This will enable sending of large files.

In the code that alejandro posted, the line:

while (read(DAT, my $picture, 4096)) {

could become:

while (read(DAT, my $picture, 72*57)) {

To read a bit more about this, see the examples section in http://perldoc.perl.org/MIME/Base64.html

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1098581]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-23 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found