Seacolor Labs. このページをアンテナに追加 RSSフィード

2007-01-14

[] Publish::Gmailで要約を送信 20:17  Publish::Gmailで要約を送信 - Seacolor Labs. を含むブックマーク はてなブックマーク -  Publish::Gmailで要約を送信 - Seacolor Labs.  Publish::Gmailで要約を送信 - Seacolor Labs. のブックマークコメント

一足早くPlugin::Summaryを試してみたい人へ。

assets/plugins/Publish-Gmail/gmail_notify.tt

[% USE util = Plagger.Util -%]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=[% encoding %]" />
</head>
<body>
[% FOREACH entry = feed.entries -%]
<div>
<div>
[% IF entry.icon %]<a href="[% entry.permalink | html %]"><img [% util.dumbnail(entry.icon, width=150, height=60) %] style="border:0" align="right" src="[% entry.icon.url | html %]" alt="[% (entry.icon.title || entry.title) | html %]" /></a>
[% ELSIF feed.image %]<a href="[% feed.link | html %]"><img [% util.dumbnail(feed.image, width=150, height=60) %] style="border:0" align="right" src="[% feed.image.url | html %]" alt="[% feed.title | html %]" /></a>
[% END -%]
<strong style="font-weight:bold;font-size:1.2em">[% entry.title %]</strong><br />
Link: <a href="[% entry.permalink | html %]">[% entry.permalink | html %]</a><br />
[% IF entry.author %]by [% entry.author | html %][% END %][% IF entry.tags.size %] on [% entry.tags.join(',') %][% END %]</div>
[% IF entry.summary -%]
[% entry.summary %]
[% ELSE %]<br />[% END %]
<div style="font-size:0.8em">[% IF entry.date %]Posted on [% entry.date.format('Mail') %][% END %] | <a href="[% entry.permalink | html %]">permalink</a> | <a href="[% feed.link | html %]">[% feed.title | html %]</a>[% FOREACH widget = entry.widgets %] | [% widget.html(entry) %][% END %]<br clear="all" /></div>
</div>
[% UNLESS loop.last %]<hr />[% END %]
[%- END %]
</body>
</html>

config.yaml

  - module: Summary::Japanese
  - module: Publish::Gmail
    config:
      assets_path: (上記gmail_notify.ttを保存したフォルダパス)
      mailto:   (send to mail address)
      mailfrom: (your mail address)
      mailroute:
        via: smtp_tls
        host: smtp.gmail.com:587
        username: (your account)
        password: (your account password)