Changeset 21

Show
Ignore:
Timestamp:
02/05/06 11:00:59
Author:
miyagawa
Message:

HTML has a better document structure; Fixes #4

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Publish/Gmail.pm

    r18 r21  
    4949    my($self, $context, $feed, $subject, $body) = @_; 
    5050 
     51    $body = $self->htmlize($body); 
     52 
    5153    my $cfg = $self->conf; 
    5254    $context->log(warn => "Sending $subject to $cfg->{mailto}"); 
     
    7476} 
    7577 
     78sub htmlize { 
     79    my($self, $body) = @_; 
     80    return <<HTML; 
     81<html> 
     82<head> 
     83<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
     84</head> 
     85<body> 
     86$body 
     87</body> 
     88</html> 
     89HTML 
     90} 
     91 
    7692sub templatize { 
    7793    my($self, $context, $feed, $item) = @_;