http://qs321.pair.com?node_id=1211089


in reply to Re^7: Using Net::SMTP to send pdf attachment
in thread Using Net::SMTP to send pdf attachment

Yayy! It's working now with the changes you made. Great Thanks !!!

Thanks too for the improved time subroutine.

Just out of curiosity, how does changing the chunk/buff to 4104 make the pdf file work? Will it work for all other pdf files created in similar fashion? Is 4104 a sort of magic number - would other numbers like 4105 or 4106 work too?

  • Comment on Re^8: Using Net::SMTP to send pdf attachment

Replies are listed 'Best First'.
Re^9: Using Net::SMTP to send pdf attachment
by poj (Abbot) on Mar 17, 2018 at 15:55 UTC

    The max encoded line length is 76. 3 bytes = 4 chars so 57 bytes = one full line. Any multiple of 3 avoids adding filler characters '=' to make up the encoded 4 characters and multiples of 57 give minimal line endings. 4095 also worked but 4104 is just the nearest multiple of 57 to 4096. See EXAMPLES in MIME::Base64

    poj

      Many thanks for your explanation :)