[ create a new paste ] login | about

Link: http://codepad.org/kjy0aoCh    [ raw code | fork ]

Perl, pasted on Feb 20:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings;
use utf8;
use Encode;
use Email::MIME::Creator;
use Email::Sender::Simple qw(sendmail);

my $mail = Email::MIME->create(
    header => [
        From    => 'from@example.com',
        To      => 'to@example.com',
        Subject => Encode::encode('MIME-Header-ISO_2022_JP', 'コンニチワ'),
    ],
    attributes => {
        charset  => 'ISO-2022-JP',
        encoding => '7bit',
    },
    body_str => '元気でやってるかー?'
);

sendmail($mail, {from => 'bounce@example.com'});


Create a new paste based on this one


Comments: