in reply to Does Email::Simple have "attachment" option?

It is possible to send messages with attachments with Email::Simple, but only by manually handling all the encoding.

You probably want Email::Stuffer.

  • Comment on Re: Does Email::Simple have "attachment" option?

Replies are listed 'Best First'.
Re^2: Does Email::Simple have "attachment" option?
by Anonymous Monk on Aug 30, 2020 at 21:44 UTC

    Thank you for the response, but I was looking for a way to to send multiple attachments, it that possible with Email::Stuffer?

      Yes, you just call the attach or attach_file methods multiple times.

      use Email::Stuffer; 'Email::Stuffer' ->transport('SMTP', { host => '10.0.0.123' }) ->from('alice@example.net') ->to('bob@example.org') ->subject('Test') ->text_body("This is a test.\n") ->attach_file('wait_its_all_cake.jpeg') ->attach_file('always_has_been.gif') ->send_or_die;

      Most likely, yes, if you handle all the encoding of the body parts yourself.

      Maybe now is a good moment to use MIME::Lite? Despite the claims in its documentation, it still works well and allows for attachments...