How can I send email attachment without using an additional library in Perl?

后端 未结 6 919
感情败类
感情败类 2021-01-15 06:49

Hey, I was wondering if there is a way to attach files (specifically .csv files) to a mail message in Perl without using MIME::Lite or any other libraries.

Right now

6条回答
  •  忘掉有多难
    2021-01-15 07:02

    you can specify the mail-headers as :

    Content-Type ie: image/jpeg; name="file.jpg"
    Content-Disposition (ie ) attachment; filename="name.jpg"
    Content-Transfer-Encoding (ie) base64

    Look at an email sent with an attachment, that should help you out.

    the trick is multipart boundaries.
    http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html

提交回复
热议问题