Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by melsael (Initiate)
on Aug 26, 2014 at 07:20 UTC ( #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
Node Status?
node history
Node Type: note [id://1098581]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2021-04-21 07:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?