Send mail with Perl

How to simply send mail in Perl?

I use Email::Simple to send an email in a perl script (many emails), here is an example:

my $sendmail = "/usr/sbin/sendmail -t";
my $email = Email::Simple->create(
     header => [
          From    => 'some@thing.tld',
          To      => 'some@destination.tld',
          Subject => 'Subject of the Message',
      ],
      body => 'Body of the Email',
);

$email->header_set( 'X-Content-Container' => 'bottle/glass' );

open SENDMAIL, "|$sendmail" or die "Cannot open $sendmail: $!";
    print SENDMAIL $email->as_string;
close SENDMAIL;

As we can see, it’s very simple to build a new Email message from scratch, I’m sure that exists a lot of way better than this, but I like Email::Simple :)

Any comment or suggestion is wellcome.

Bye ;)