Commit | Line | Data |
---|---|---|
44fd0890 | 1 | #!/usr/bin/perl |
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | use Email::MIME; | |
6 | use File::Slurp 'read_file'; | |
7 | ||
8 | my ($from, $to, $subject) = @ARGV; | |
9 | my $body = read_file \*STDIN; | |
10 | ||
11 | ||
12 | my $email = Email::MIME->create( | |
13 | header => [ | |
14 | From => $from, | |
15 | To => $to, | |
16 | Subject => $subject, | |
17 | ], | |
18 | body => $body, | |
19 | ); | |
20 | print $email->as_string; |