2007年01月28日 (日)
Sledge::Plugin::Email::Japaneseで添付ファイル
な、パッチ。
@@ -37,6 +37,12 @@
$self->session->param('last_mail' => $msg->as_string);
}
+ if ($args->{Attachment}) {
+ for my $attachment (@{$args->{Attachment}}) {
+ $msg->attach(%$attachment);
+ }
+ }
+
if ($sendmail_opt || $email_conf->{send}) {
$msg->send(@{$sendmail_opt || $email_conf->{send}});
} else {
@@ -66,6 +72,13 @@
TmplParams => {
name => $self->r->param('name'),
},
+ Attachment => [{
+ Type =>'image/gif',
+ Path =>'aaa000123.gif',
+ Filename =>'logo.gif',
+ Data =>"Here's the GIF file you wanted"
+ Disposition => 'attachment'
+ }],
},
);
}
posted by takefumi
|
この日記へリンク
|
コメント(0)
|
トラックバック(0)

