Skip to content

Instantly share code, notes, and snippets.

@tanabe
Created August 5, 2011 16:49
Show Gist options
  • Select an option

  • Save tanabe/1127957 to your computer and use it in GitHub Desktop.

Select an option

Save tanabe/1127957 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use Email::MIME;
use Email::Send;
use utf8;
my $sender = Email::Send->new({mailer => 'Sendmail'});
my $email = Email::MIME->create(
header => [
From => 'hoge@example.com',
To => 'foo@example.com',
],
attributes => {
charset => 'iso-2022-jp',
encoding => '7bit',
},
body_str => <<'...',
日本語でもok
...
);
$sender->send($email) or die "send() failed";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment