How I Learned to Stop Worrying and Love Email::: The 2007 PEP Talk!!

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Group

    How I Learned to Stop Worrying and Love Email::: The 2007 PEP Talk!! - Presentation Transcript

    1. Perl Email Project the 2007 PEP talk!!!
    2. How I Learned To Stop Worrying and Love Email
    3. rjbs @cpan.org
    4. we’re hiring: http://xrl.us/pobox
    5. Perl Email Project
    6. PEP
    7. Email::
    8. simple efficient accurate
    9. less processor time
    10. less memory
    11. fewer classes
    12. fewer methods
    13. LESS OF A PAIN IN THE ASS
    14. Make Email Handling Suck Less
    15. writing better modules
    16. maintaining old modules
    17. sharing knowledge
    18. Modules!
    19. Frameworks
    20. Mail-Box
    21. Email::
    22. Message Objects
    23. Email::Simple & Email::MIME
    24. use Email::Simple;
    25. use Email::Simple; my $email = Email::Simple->new($string);
    26. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator;
    27. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create(
    28. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [
    29. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘rjbs@cpan.org’,
    30. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’,
    31. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’,
    32. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => ‘1099’,
    33. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => ‘1099’, Keyword => ‘1040’,
    34. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => ‘1099’, Keyword => ‘1040’, ],
    35. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => ‘1099’, Keyword => ‘1040’, ], body => “[ insert threatening text here ]”
    36. use Email::Simple; my $email = Email::Simple->new($string); use Email::Simple::Creator; my $email = Email::Simple->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => ‘1099’, Keyword => ‘1040’, ], body => “[ insert threatening text here ]” );
    37. $email->as_string;
    38. $email->as_string; $email->header(‘Subject’);
    39. $email->as_string; $email->header(‘Subject’); $email->header_set(Subject => ‘Re: mtfnpy’);
    40. $email->as_string; $email->header(‘Subject’); $email->header_set(Subject => ‘Re: mtfnpy’); $email->body;
    41. $email->as_string; $email->header(‘Subject’); $email->header_set(Subject => ‘Re: mtfnpy’); $email->body; $email->body_set($big_string);
    42. use Email::Simple;
    43. use Email::Simple; my $email = Email::Simple->new( \\$string );
    44. use Email::Simple; my $email = Email::Simple->new( \\$string ); $email->body_set( \\$new_body );
    45. use Email::Simple; my $email = Email::Simple->new( \\$string ); $email->body_set( \\$new_body ); use Email::Simple::FromHandle;
    46. use Email::Simple; my $email = Email::Simple->new( \\$string ); $email->body_set( \\$new_body ); use Email::Simple::FromHandle; my $email = Email::SimpleFromHandle->new(
    47. use Email::Simple; my $email = Email::Simple->new( \\$string ); $email->body_set( \\$new_body ); use Email::Simple::FromHandle; my $email = Email::SimpleFromHandle->new( $input_handle
    48. use Email::Simple; my $email = Email::Simple->new( \\$string ); $email->body_set( \\$new_body ); use Email::Simple::FromHandle; my $email = Email::SimpleFromHandle->new( $input_handle );
    49. use Email::Simple; my $email = Email::Simple->new( \\$string ); $email->body_set( \\$new_body ); use Email::Simple::FromHandle; my $email = Email::SimpleFromHandle->new( $input_handle ); $email->stream_to($output_handle);
    50. my $email = Email::MIME->new(\\$string);
    51. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator;
    52. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create(
    53. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [
    54. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’,
    55. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’,
    56. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’,
    57. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ],
    58. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ], attributes =>
    59. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ], attributes => { content_type => ‘multipart/mixed’ },
    60. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ], attributes => { content_type => ‘multipart/mixed’ }, parts => [
    61. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ], attributes => { content_type => ‘multipart/mixed’ }, parts => [ Email::MIME->create(...),
    62. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ], attributes => { content_type => ‘multipart/mixed’ }, parts => [ Email::MIME->create(...), Email::MIME->create(...),
    63. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ], attributes => { content_type => ‘multipart/mixed’ }, parts => [ Email::MIME->create(...), Email::MIME->create(...), ],
    64. my $email = Email::MIME->new(\\$string); use Email::MIME::Creator; my $email = Email::MIME->create( header => [ To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ], attributes => { content_type => ‘multipart/mixed’ }, parts => [ Email::MIME->create(...), Email::MIME->create(...), ], );
    65. $email->subparts;
    66. $email->subparts; $email->parts_set(@parts);
    67. $email->subparts; $email->parts_set(@parts); $email->body_raw;
    68. problems
    69. problems still not efficient enough
    70. problems still not efficient enough FromHandle doesn’t do MIME
    71. problems still not efficient enough FromHandle doesn’t do MIME Email::MIME doesn’t stream
    72. problems still not efficient enough FromHandle doesn’t do MIME Email::MIME doesn’t stream fairly small feature set*
    73. MIME::Entity
    74. my $entity = MIME::Entity->new($input_handle);
    75. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines);
    76. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build(
    77. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’,
    78. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’,
    79. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’,
    80. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ‘Keyword:’ => [ 1099, 1040 ],
    81. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ‘Keyword:’ => [ 1099, 1040 ], Data => [ “This might be an audit.” ],
    82. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ‘Keyword:’ => [ 1099, 1040 ], Data => [ “This might be an audit.” ], );
    83. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ‘Keyword:’ => [ 1099, 1040 ], Data => [ “This might be an audit.” ], ); $entity->attach(
    84. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ‘Keyword:’ => [ 1099, 1040 ], Data => [ “This might be an audit.” ], ); $entity->attach( Path => ‘./reports/audit-results.pdf’,
    85. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ‘Keyword:’ => [ 1099, 1040 ], Data => [ “This might be an audit.” ], ); $entity->attach( Path => ‘./reports/audit-results.pdf’, Type => ‘application/pdf’,
    86. my $entity = MIME::Entity->new($input_handle); my $entity = MIME::Entity->new(\\@lines); my $entity = MIME::Entity->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, ‘Keyword:’ => [ 1099, 1040 ], Data => [ “This might be an audit.” ], ); $entity->attach( Path => ‘./reports/audit-results.pdf’, Type => ‘application/pdf’, );
    87. problems
    88. problems really big (loads 50+ extra modules)
    89. problems really big (loads 50+ extra modules) large, sometimes confusing interface
    90. problems really big (loads 50+ extra modules) large, sometimes confusing interface history of subtle bugs
    91. Mail::Message (a Mail::Box Production)
    92. my $mail = Mail::Message->read($input_handle);
    93. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build(
    94. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’,
    95. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’,
    96. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’,
    97. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => 1099,
    98. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => 1099, Keyword => 1040,
    99. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => 1099, Keyword => 1040,
    100. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => 1099, Keyword => 1040, data => “This might be an audit.\\n”,
    101. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => 1099, Keyword => 1040, data => “This might be an audit.\\n”, file => ‘./reports/audit-results.pdf’,
    102. my $mail = Mail::Message->read($input_handle); my $mail = Mail::Message->build( To => ‘rjbs@cpan.org’, From => ‘IRS <the.man@irs.gov>’, Subject => ‘Please See Me’, Keyword => 1099, Keyword => 1040, data => “This might be an audit.\\n”, file => ‘./reports/audit-results.pdf’, );
    103. $mail->string;
    104. $mail->string; $mail->head->get(‘Subject’);
    105. $mail->string; $mail->head->get(‘Subject’); $mail->head->delete(‘X-Pointles’);
    106. $mail->string; $mail->head->get(‘Subject’); $mail->head->delete(‘X-Pointles’); $mail->head->reset(Subject => “I’m on TV!”);
    107. $mail->string; $mail->head->get(‘Subject’); $mail->head->delete(‘X-Pointles’); $mail->head->reset(Subject => “I’m on TV!”); $mail->body(
    108. $mail->string; $mail->head->get(‘Subject’); $mail->head->delete(‘X-Pointles’); $mail->head->reset(Subject => “I’m on TV!”); $mail->body( Mail::Message::Body->new(data => $data),
    109. $mail->string; $mail->head->get(‘Subject’); $mail->head->delete(‘X-Pointles’); $mail->head->reset(Subject => “I’m on TV!”); $mail->body( Mail::Message::Body->new(data => $data), );
    110. $mail->body->parts;
    111. $mail->body->parts; $mail->body->attach(@things);
    112. $mail->body->parts; $mail->body->attach(@things); $mail->body->part(1)->delete;
    113. $mail->body->parts; $mail->body->attach(@things); $mail->body->part(1)->delete; my @parts = $mail->body->parts(
    114. $mail->body->parts; $mail->body->attach(@things); $mail->body->part(1)->delete; my @parts = $mail->body->parts( sub { $_[0]->mimeType eq ‘text/html }
    115. $mail->body->parts; $mail->body->attach(@things); $mail->body->part(1)->delete; my @parts = $mail->body->parts( sub { $_[0]->mimeType eq ‘text/html } );
    116. $mail->body->parts; $mail->body->attach(@things); $mail->body->part(1)->delete; my @parts = $mail->body->parts( sub { $_[0]->mimeType eq ‘text/html } ); $_->delete for @parts;
    117. $mail->body->parts; $mail->body->attach(@things); $mail->body->part(1)->delete; my @parts = $mail->body->parts( sub { $_[0]->mimeType eq ‘text/html } ); $_->delete for @parts; $mail->body->rebuild;
    118. problems
    119. problems really big (loads 40+ extra modules)
    120. problems really big (loads 40+ extra modules) large, sometimes confusing interface
    121. Mail::Internet
    122. Mail::Internet
    123. MIME::Lite
    124. MIME::Lite
    125. Email::Abstract
    126. my $abstract = Email::Abstract->new($thing);
    127. my $abstract = Email::Abstract->new($thing);
    128. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’);
    129. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’); $abstract->set_header(Subject => ‘Foo!’);
    130. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’); $abstract->set_header(Subject => ‘Foo!’);
    131. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’); $abstract->set_header(Subject => ‘Foo!’); $abstract->get_body;
    132. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’); $abstract->set_header(Subject => ‘Foo!’); $abstract->get_body; $abstract->set_body(‘This is a short body!’);
    133. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’); $abstract->set_header(Subject => ‘Foo!’); $abstract->get_body; $abstract->set_body(‘This is a short body!’);
    134. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’); $abstract->set_header(Subject => ‘Foo!’); $abstract->get_body; $abstract->set_body(‘This is a short body!’); $abstract->as_string;
    135. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’); $abstract->set_header(Subject => ‘Foo!’); $abstract->get_body; $abstract->set_body(‘This is a short body!’); $abstract->as_string;
    136. my $abstract = Email::Abstract->new($thing); $abstract->get_header(‘Subject’); $abstract->set_header(Subject => ‘Foo!’); $abstract->get_body; $abstract->set_body(‘This is a short body!’); $abstract->as_string; $abstract->cast(‘Mail::Internet’);
    137. Email::Simple & ::MIME
    138. Email::Simple & ::MIME MIME::Entity
    139. Email::Simple & ::MIME MIME::Entity Mail::Internet
    140. Email::Simple & ::MIME MIME::Entity Mail::Internet Mail::Message
    141. Email::Simple & ::MIME MIME::Entity Mail::Internet Mail::Message more coming
    142. problems
    143. problems missing some key methods
    144. problems missing some key methods needs more testing for complex message types
    145. problems missing some key methods needs more testing for complex message types can be inefficient
    146. suggestion
    147. suggestion learn all of Email::Simple and most of Email::MIME
    148. suggestion learn all of Email::Simple and most of Email::MIME for sending your own simple emails, use these
    149. suggestion
    150. suggestion learn the basics of Mail::Message
    151. suggestion learn the basics of Mail::Message use it if you know you’ll need to use more of Mail::Box in the future
    152. suggestion learn the basics of Mail::Message use it if you know you’ll need to use more of Mail::Box in the future use it if you have complex encoding or MIME-handling requirements
    153. suggestion
    154. suggestion learn the basics of handling MIME::Entity messages
    155. suggestion learn the basics of handling MIME::Entity messages lots of code uses them
    156. suggestion learn the basics of handling MIME::Entity messages lots of code uses them use MIME::Entity when you need to cope with crappy input that nothing else can parse
    157. suggestion
    158. suggestion if you write an API that is passed an email message, consider using Abstract
    159. suggestion if you write an API that is passed an email message, consider using Abstract if it exists primarily for handling email, pick a more complete library to use, and stick to it.
    160. Email Collections
    161. Mail::Box
    162. my $maildir = Mail::Box::Maildir->new
    163. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’,
    164. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, );
    165. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, );
    166. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4);
    167. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4);
    168. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4); $message->delete;
    169. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4); $message->delete;
    170. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4); $message->delete; my $newmsg = Mail::Message->new(...);
    171. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4); $message->delete; my $newmsg = Mail::Message->new(...);
    172. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4); $message->delete; my $newmsg = Mail::Message->new(...); $maildir->addMessage($newmsg);
    173. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4); $message->delete; my $newmsg = Mail::Message->new(...); $maildir->addMessage($newmsg);
    174. my $maildir = Mail::Box::Maildir->new folder => ‘./Maildir/’, ); my $message = $maildir->message(4); $message->delete; my $newmsg = Mail::Message->new(...); $maildir->addMessage($newmsg); $maildir->write;
    175. folders over the net
    176. subfolders
    177. threading
    178. delayed reading & construction
    179. suggestion
    180. suggestion if you need to manage mailboxes, just use it
    181. suggestion if you need to manage mailboxes, just use it there isn’t really any alternative
    182. suggestion if you need to manage mailboxes, just use it there isn’t really any alternative unless you count...
    183. Email::Folder (and friends)
    184. a bunch of modules
    185. Email::Feature::Type
    186. Email::FolderType
    187. use Email::FolderType qw(folder_type);
    188. use Email::FolderType qw(folder_type);
    189. use Email::FolderType qw(folder_type); my $type = folder_type(‘./Maildir’);
    190. use Email::FolderType qw(folder_type); my $type = folder_type(‘./Maildir’); # => ‘Mbox’
    191. use Email::FolderType qw(folder_type); my $type = folder_type(‘./Maildir’); # => ‘Mbox’
    192. use Email::FolderType qw(folder_type); my $type = folder_type(‘./Maildir’); # => ‘Mbox’ my $type = folder_type(‘./Maildir/’);
    193. use Email::FolderType qw(folder_type); my $type = folder_type(‘./Maildir’); # => ‘Mbox’ my $type = folder_type(‘./Maildir/’); # => ‘Maildir’
    194. use Email::FolderType qw(folder_type); my $type = folder_type(‘./Maildir’); # => ‘Mbox’ my $type = folder_type(‘./Maildir/’); # => ‘Maildir’
    195. use Email::FolderType qw(folder_type); my $type = folder_type(‘./Maildir’); # => ‘Mbox’ my $type = folder_type(‘./Maildir/’); # => ‘Maildir’ my $type = folder_type(‘./Maildir//’);
    196. use Email::FolderType qw(folder_type); my $type = folder_type(‘./Maildir’); # => ‘Mbox’ my $type = folder_type(‘./Maildir/’); # => ‘Maildir’ my $type = folder_type(‘./Maildir//’); # => Ezmlm
    197. Email::Folder
    198. Email::Folder::Reader
    199. my $reader = Email::Folder->new(“./Maildir/”);
    200. my $reader = Email::Folder->new(“./Maildir/”);
    201. my $reader = Email::Folder->new(“./Maildir/”); while (my $email = $reader->next_message) {
    202. my $reader = Email::Folder->new(“./Maildir/”); while (my $email = $reader->next_message) { print “to delete!”
    203. my $reader = Email::Folder->new(“./Maildir/”); while (my $email = $reader->next_message) { print “to delete!” if $email->header(‘from’) =~ /Laura/i;
    204. my $reader = Email::Folder->new(“./Maildir/”); while (my $email = $reader->next_message) { print “to delete!” if $email->header(‘from’) =~ /Laura/i; }
    205. Email::Delete
    206. my $reader = Email::Folder->new(“./Maildir/”); while (my $email = $reader->next_message) { $email->delete if $email->header(‘from’) =~ /Laura/i; }
    207. E D O C my $reader = Email::Folder->new(“./Maildir/”); L A while (my $email = $reader->next_message) { E R $email->delete T if $email->header(‘from’) =~ /Laura/i; O } N
    208. delete_message(
    209. delete_message( from => “./Maildir/”,
    210. delete_message( from => “./Maildir/”, matching => sub {
    211. delete_message( from => “./Maildir/”, matching => sub { shift->header(‘message-id’)
    212. delete_message( from => “./Maildir/”, matching => sub { shift->header(‘message-id’) eq
    213. delete_message( from => “./Maildir/”, matching => sub { shift->header(‘message-id’) eq $email->header(‘message-id’)
    214. delete_message( from => “./Maildir/”, matching => sub { shift->header(‘message-id’) eq $email->header(‘message-id’) },
    215. delete_message( from => “./Maildir/”, matching => sub { shift->header(‘message-id’) eq $email->header(‘message-id’) }, );
    216. my $reader = Email::Folder->new(“./Maildir/”);
    217. my $reader = Email::Folder->new(“./Maildir/”);
    218. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1
    219. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message;
    220. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message;
    221. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message(
    222. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message( from => “./Maildir”,
    223. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message( from => “./Maildir”, matching => sub { my $email = shift;
    224. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message( from => “./Maildir”, matching => sub { my $email = shift; $email->header(‘references’)
    225. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message( from => “./Maildir”, matching => sub { my $email = shift; $email->header(‘references’) and
    226. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message( from => “./Maildir”, matching => sub { my $email = shift; $email->header(‘references’) and ! $saw_id{ $email->header(‘references’) }
    227. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message( from => “./Maildir”, matching => sub { my $email = shift; $email->header(‘references’) and ! $saw_id{ $email->header(‘references’) } },
    228. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message( from => “./Maildir”, matching => sub { my $email = shift; $email->header(‘references’) and ! $saw_id{ $email->header(‘references’) } }, );
    229. my $reader = Email::Folder->new(“./Maildir/”); $saw_id{ $_->header(‘message-id’) } = 1 while my $_ = $reader->next_message; delete_message( from => “./Maildir”, matching => sub { my $email = shift; $email->header(‘references’) and ! $saw_id{ $email->header(‘references’) } }, );
    230. so, we can delete
    231. (sort of)
    232. how do we add?
    233. Email::LocalDelivery
    234. @successes = Email::LocalDelivery->deliver(
    235. @successes = Email::LocalDelivery->deliver( $string,
    236. @successes = Email::LocalDelivery->deliver( $string, ‘./Maildir/’,
    237. @successes = Email::LocalDelivery->deliver( $string, ‘./Maildir/’, ‘/var/spool/mail/rjbs’,
    238. @successes = Email::LocalDelivery->deliver( $string, ‘./Maildir/’, ‘/var/spool/mail/rjbs’, ‘imap://rjbs@mailstore.pobox.com/INBOX’,
    239. @successes = Email::LocalDelivery->deliver( $string, ‘./Maildir/’, ‘/var/spool/mail/rjbs’, ‘imap://rjbs@mailstore.pobox.com/INBOX’, );
    240. @successes = Email::LocalDelivery->deliver( $string, ‘./Maildir/’, ‘/var/spool/mail/rjbs’, ‘imap://rjbs@mailstore.pobox.com/INBOX’, );
    241. can’t stream the message must load it all into memory and then copy it
    242. problems
    243. problems the pieces don’t fit together
    244. problems the pieces don’t fit together can be very inefficient
    245. problems the pieces don’t fit together can be very inefficient difficult to extend
    246. suggestion
    247. suggestion fine for a quick one-off
    248. suggestion fine for a quick one-off not ready for prime time
    249. Net::Protocol
    250. Mail::POP3Client Net::POP3 Net::IMAP Net::IMAP::Simple Mail::IMAPClient
    251. Sending Mail
    252. Mail::Send
    253. Mail::Mailer
    254. my $mailer = Mail::Mailer->new(‘sendmail’);
    255. my $mailer = Mail::Mailer->new(‘sendmail’);
    256. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({
    257. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ],
    258. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ], Bcc => ‘the.ceo@corp’,
    259. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ], Bcc => ‘the.ceo@corp’, Subject => ‘u sux’,
    260. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ], Bcc => ‘the.ceo@corp’, Subject => ‘u sux’, });
    261. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ], Bcc => ‘the.ceo@corp’, Subject => ‘u sux’, });
    262. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ], Bcc => ‘the.ceo@corp’, Subject => ‘u sux’, }); print $mailer \"Body of message\";
    263. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ], Bcc => ‘the.ceo@corp’, Subject => ‘u sux’, }); print $mailer \"Body of message\";
    264. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ], Bcc => ‘the.ceo@corp’, Subject => ‘u sux’, }); print $mailer \"Body of message\"; $mailer->close;
    265. my $mailer = Mail::Mailer->new(‘sendmail’); $mailer->open({ To => [ ‘boss@corp’, ‘boss2@corp’ ], Bcc => ‘the.ceo@corp’, Subject => ‘u sux’, }); print $mailer \"Body of message\"; $mailer->close; # ...and it gets sent
    266. Mail::Sender
    267. my $sender = Mail::Sender->new({ smtp => ‘smtp.haliburton.gov’, }); $sender->Open({ from => 'your@address.com', to => 'other@address.com', subject => 'HTML test', ctype => \"text/html\", encoding => \"7bit\" }) or die $Mail::Sender::Error,\"\\n\"; while (<$input>) { $sender->SendEx($_); # no encoding! }; $sender->Close();
    268. Mail::Sendmail
    269. use Mail::Sendmail; sendmail( To => ‘guy@2nd.row.org’, From => ‘rjbs@cpan.org’, Subject => ‘STFU’, Body => $entire_message_body, ) or die “sendmail: $Mail::Sendmail::error”;
    270. Mail::Transport (a Mail::Box Production)
    271. my $sender = Mail::Transport::SMTP->new(
    272. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’,
    273. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’,
    274. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’, password => ‘viagra’,
    275. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’, password => ‘viagra’, );
    276. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’, password => ‘viagra’, );
    277. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’, password => ‘viagra’, ); $sender->send(
    278. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’, password => ‘viagra’, ); $sender->send( $message,
    279. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’, password => ‘viagra’, ); $sender->send( $message, from => $env_sender,
    280. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’, password => ‘viagra’, ); $sender->send( $message, from => $env_sender, to => $env_rcpt,
    281. my $sender = Mail::Transport::SMTP->new( hostname => ‘nebu.fleet.zion.gov’, username => ‘t.anderson@yahoo.com’, password => ‘viagra’, ); $sender->send( $message, from => $env_sender, to => $env_rcpt, );
    282. ::Exim ::Mailx ::Qmail ::SMTP ::Sendmail
    283. Email::Send
    284. my $sender = Email::Send->new({
    285. my $sender = Email::Send->new({ mailer => ‘SMTP’,
    286. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [
    287. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’,
    288. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’,
    289. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’,
    290. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’, ],
    291. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’, ], });
    292. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’, ], });
    293. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’, ], }); my $rv = $sender->send($email);
    294. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’, ], }); my $rv = $sender->send($email);
    295. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’, ], }); my $rv = $sender->send($email); unless ($rv) {
    296. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’, ], }); my $rv = $sender->send($email); unless ($rv) { die “failed to send: “ . $rv->string;
    297. my $sender = Email::Send->new({ mailer => ‘SMTP’, mailer_args => [ Host => ‘sir-mx-a-lot.plusplus.com’, username => ‘rjbs’, password => ‘g0t b4ckUPS’, ], }); my $rv = $sender->send($email); unless ($rv) { die “failed to send: “ . $rv->string; }
    298. problems
    299. problems Return::Value
    300. problems Return::Value no envelope sender
    301. problems Return::Value no envelope sender awkward mailer/sender distinction
    302. problems Return::Value no envelope sender awkward mailer/sender distinction difficult to extend api
    303. problems Return::Value no envelope sender awkward mailer/sender distinction difficult to extend api not enough API guaranteed for interchangeability
    304. Email::Sender?
    305. my $sender = Email::Sender::SMTP->new({
    306. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’,
    307. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’,
    308. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’,
    309. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, });
    310. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, });
    311. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, }); $sender->send(
    312. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, }); $sender->send( $email,
    313. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, }); $sender->send( $email, {
    314. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, }); $sender->send( $email, { to => $env_rcpt, # or \\@env_rcpts
    315. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, }); $sender->send( $email, { to => $env_rcpt, # or \\@env_rcpts from => $env_sender,
    316. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, }); $sender->send( $email, { to => $env_rcpt, # or \\@env_rcpts from => $env_sender, }
    317. my $sender = Email::Sender::SMTP->new({ host => ‘sir-mx-a-lot.plusplus.com’, user => ‘rjbs’, pass => ‘wishiwereanoscarmeyerweiner’, }); $sender->send( $email, { to => $env_rcpt, # or \\@env_rcpts from => $env_sender, } );
    318. Email::Sender::Simple->send( $email, { to => $recipient, from => $sender, }, );
    319. Email::Sender::Simple->send( $email, { to => $recipient, from => $sender, }, ); $ EMAIL_SENDER=SQLite ./your-program
    320. Filtering Mail
    321. Mail::Audit
    322. my $mail = Mail::Audit->new;
    323. my $mail = Mail::Audit->new;
    324. my $mail = Mail::Audit->new; $mail->ignore if $mail->from_daemon;
    325. my $mail = Mail::Audit->new; $mail->ignore if $mail->from_daemon;
    326. my $mail = Mail::Audit->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’)
    327. my $mail = Mail::Audit->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i;
    328. my $mail = Mail::Audit->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i;
    329. my $mail = Mail::Audit->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i; $mail->reject if $mail->from =~ /laura/i;
    330. my $mail = Mail::Audit->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i; $mail->reject if $mail->from =~ /laura/i;
    331. my $mail = Mail::Audit->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i; $mail->reject if $mail->from =~ /laura/i; $mail->accept;
    332. Email::Filter
    333. my $mail = Email::Filter->new;
    334. my $mail = Email::Filter->new;
    335. my $mail = Email::Filter->new; $mail->ignore if $mail->from_daemon;
    336. my $mail = Email::Filter->new; $mail->ignore if $mail->from_daemon;
    337. my $mail = Email::Filter->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’)
    338. my $mail = Email::Filter->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i;
    339. my $mail = Email::Filter->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i;
    340. my $mail = Email::Filter->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i; $mail->reject if $mail->from =~ /laura/i;
    341. my $mail = Email::Filter->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i; $mail->reject if $mail->from =~ /laura/i;
    342. my $mail = Email::Filter->new; $mail->ignore if $mail->from_daemon; $mail->accept(‘apologies’) if $mail->subject =~ /sorry/i; $mail->reject if $mail->from =~ /laura/i; $mail->accept;
    343. key differences
    344. key differences Mail::Audit does more
    345. key differences Mail::Audit does more Mail::Audit is > 4x the size
    346. key differences Mail::Audit does more Mail::Audit is > 4x the size Mail::Audit is totally insane
    347. key differences Mail::Audit does more Mail::Audit is > 4x the size Mail::Audit is totally insane Mail::Audit is better tested
    348. Mail::Procmail
    349. Mail::Procmail It’s like Mail::Audit
    350. Mail::Procmail It’s like Mail::Audit but exports a bunch of subs
    351. Mail::Procmail It’s like Mail::Audit but exports a bunch of subs can be made into a E::F plugin
    352. Mail::Procmail It’s like Mail::Audit but exports a bunch of subs can be made into a E::F plugin built-in logging
    353. Mail::Sort
    354. Mail::Sort It’s like Mail::Audit
    355. Mail::Sort It’s like Mail::Audit but has lots more methods
    356. Mail::Sort It’s like Mail::Audit but has lots more methods mostly for common matches
    357. Mail::Sort It’s like Mail::Audit but has lots more methods mostly for common matches could be some E::F plugins
    358. Email Addresses
    359. HATE!!
    360. Mail::Address Email::Address
    361. Mail::Address Email::Address
    362. Mail::Message ::Field:: Address
    363. Email::Valid address is well-formed domain actually exists domain name is valid some per-domain rules domain is fqdn in a tld some fudging allowed
    364. Cool Stuff
    365. Email::Stuff
    366. Email::Stuff
    367. Email::Stuff ->from('Principal Skinner <seymore@se.edu>')
    368. Email::Stuff ->from('Principal Skinner <seymore@se.edu>') ->to('rjbs@cpan.org')
    369. Email::Stuff ->from('Principal Skinner <seymore@se.edu>') ->to('rjbs@cpan.org') ->text_body(“Please see me after class.”)
    370. Email::Stuff ->from('Principal Skinner <seymore@se.edu>') ->to('rjbs@cpan.org') ->text_body(“Please see me after class.”) ->header(Keywords => “trouble”)
    371. Email::Stuff ->from('Principal Skinner <seymore@se.edu>') ->to('rjbs@cpan.org') ->text_body(“Please see me after class.”) ->header(Keywords => “trouble”) ->header(Keywords => “deep”)
    372. Email::Stuff ->from('Principal Skinner <seymore@se.edu>') ->to('rjbs@cpan.org') ->text_body(“Please see me after class.”) ->header(Keywords => “trouble”) ->header(Keywords => “deep”) ->attach(
    373. Email::Stuff ->from('Principal Skinner <seymore@se.edu>') ->to('rjbs@cpan.org') ->text_body(“Please see me after class.”) ->header(Keywords => “trouble”) ->header(Keywords => “deep”) ->attach( slurp(‘1099.pdf’),
    374. Email::Stuff ->from('Principal Skinner <seymore@se.edu>') ->to('rjbs@cpan.org') ->text_body(“Please see me after class.”) ->header(Keywords => “trouble”) ->header(Keywords => “deep”) ->attach( slurp(‘1099.pdf’), filename => 'dead_bunbun_proof.gif')
    375. Email::Stuff ->from('Principal Skinner <seymore@se.edu>') ->to('rjbs@cpan.org') ->text_body(“Please see me after class.”) ->header(Keywords => “trouble”) ->header(Keywords => “deep”) ->attach( slurp(‘1099.pdf’), filename => 'dead_bunbun_proof.gif') ->send;
    376. HTML Email (yeah, I know)
    377. Email::MIME ::CreateHTML
    378. use Email::MIME::CreateHTML;
    379. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html(
    380. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [
    381. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [ to => ‘mom@aol.com’,
    382. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [ to => ‘mom@aol.com’, from => ‘rjbs@cpan.org’,
    383. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [ to => ‘mom@aol.com’, from => ‘rjbs@cpan.org’, subject => ‘Happy Birthday!’,
    384. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [ to => ‘mom@aol.com’, from => ‘rjbs@cpan.org’, subject => ‘Happy Birthday!’, ],
    385. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [ to => ‘mom@aol.com’, from => ‘rjbs@cpan.org’, subject => ‘Happy Birthday!’, ], body => $html,
    386. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [ to => ‘mom@aol.com’, from => ‘rjbs@cpan.org’, subject => ‘Happy Birthday!’, ], body => $html, );
    387. use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [ to => ‘mom@aol.com’, from => ‘rjbs@cpan.org’, subject => ‘Happy Birthday!’, ], body => $html, text_body => $text, );
    388. my $markdown = slurp(STDIN); use Email::MIME::CreateHTML; my $email = Email::MIME->create_html( header => [ to => ‘mom@aol.com’, from => ‘rjbs@cpan.org’, subject => ‘Happy Birthday!’, ], body => markdown($markdown), text_body => $markdown, );
    389. use Email::StripMIME qw(strip_mime); my $stripped_email = Email::MIME->new( strip_mime($email->as_string) );
    390. Sifting Through MIME Parts
    391. Email::MIME::XPath
    392. use Email::MIME::XPath;
    393. use Email::MIME::XPath;
    394. use Email::MIME::XPath; my ($part) = $email->xpath_findnodes(“//plain”);
    395. use Email::MIME::XPath; my ($part) = $email->xpath_findnodes(“//plain”);
    396. use Email::MIME::XPath; my ($part) = $email->xpath_findnodes(“//plain”); my @images = $email->xpath_findnodes(
    397. use Email::MIME::XPath; my ($part) = $email->xpath_findnodes(“//plain”); my @images = $email->xpath_findnodes( “//png|//jpeg|//gif”
    398. use Email::MIME::XPath; my ($part) = $email->xpath_findnodes(“//plain”); my @images = $email->xpath_findnodes( “//png|//jpeg|//gif” );
    399. use Email::MIME::XPath; my ($part) = $email->xpath_findnodes(“//plain”); my @images = $email->xpath_findnodes( “//png|//jpeg|//gif” );
    400. use Email::MIME::XPath; my ($part) = $email->xpath_findnodes(“//plain”); my @images = $email->xpath_findnodes( “//png|//jpeg|//gif” ); my $address = $part->xpath_address;
    401. use Email::MIME::XPath; my ($part) = $email->xpath_findnodes(“//plain”); my @images = $email->xpath_findnodes( “//png|//jpeg|//gif” ); my $address = $part->xpath_address; die “error in part $address!”;
    402. Sending Signed Mail
    403. my $gpg = Mail::GPG->new(
    404. my $gpg = Mail::GPG->new( default_key_id => ‘12345678’,
    405. my $gpg = Mail::GPG->new( default_key_id => ‘12345678’, ;
    406. my $gpg = Mail::GPG->new( default_key_id => ‘12345678’, ;
    407. my $gpg = Mail::GPG->new( default_key_id => ‘12345678’, ; my $signed_entity = $gpg->mime_sign(
    408. my $gpg = Mail::GPG->new( default_key_id => ‘12345678’, ; my $signed_entity = $gpg->mime_sign( entity => $entity,
    409. my $gpg = Mail::GPG->new( default_key_id => ‘12345678’, ; my $signed_entity = $gpg->mime_sign( entity => $entity, );
    410. Managing Your Mail
    411. addressbook = App::Addex::AddressBook::Apple
    412. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt
    413. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail
    414. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin
    415. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin
    416. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt]
    417. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook
    418. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook
    419. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook [App::Addex::Output::Procmail]
    420. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook [App::Addex::Output::Procmail] filename = procmail/friends.rc
    421. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook [App::Addex::Output::Procmail] filename = procmail/friends.rc
    422. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook [App::Addex::Output::Procmail] filename = procmail/friends.rc [App::Addex::Output::SpamAssassin]
    423. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook [App::Addex::Output::Procmail] filename = procmail/friends.rc [App::Addex::Output::SpamAssassin] filename = spamassassin/whitelists-abook
    424. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook [App::Addex::Output::Procmail] filename = procmail/friends.rc [App::Addex::Output::SpamAssassin] filename = spamassassin/whitelists-abook
    425. addressbook = App::Addex::AddressBook::Apple output = App::Addex::Output::Mutt output = App::Addex::Output::Procmail output = App::Addex::Output::SpamAssassin [App::Addex::Output::Mutt] filename = mutt/alias-abook [App::Addex::Output::Procmail] filename = procmail/friends.rc [App::Addex::Output::SpamAssassin] filename = spamassassin/whitelists-abook
    426. alias mollymillions molly@bama-online.com (Molly Millions) alias mollymillions-home molly@bama-online.com (Molly Millions) alias mollymillions-work mm@solo.com (Molly Millions) alias mollymillions-work-1 s.shears@bodymiraculous.com (Molly Millions)
    427. alias mollymillions molly@bama-online.com (Molly Millions) alias mollymillions-home molly@bama-online.com (Molly Millions) alias mollymillions-work mm@solo.com (Molly Millions) alias mollymillions-work-1 s.shears@bodymiraculous.com (Molly Millions) mailboxes =friends.molly
    428. alias mollymillions molly@bama-online.com (Molly Millions) alias mollymillions-home molly@bama-online.com (Molly Millions) alias mollymillions-work mm@solo.com (Molly Millions) alias mollymillions-work-1 s.shears@bodymiraculous.com (Molly Millions) mailboxes =friends.molly save-hook ~fmolly@bama-online.com =friends.molly save-hook ~fmm@solo.com =friends.molly save-hook ~fs.shears@bodymiraculous.com =friends.molly
    429. alias mollymillions molly@bama-online.com (Molly Millions) alias mollymillions-home molly@bama-online.com (Molly Millions) alias mollymillions-work mm@solo.com (Molly Millions) alias mollymillions-work-1 s.shears@bodymiraculous.com (Molly Millions) mailboxes =friends.molly save-hook ~fmolly@bama-online.com =friends.molly save-hook ~fmm@solo.com =friends.molly save-hook ~fs.shears@bodymiraculous.com =friends.molly send-hook ~tmolly@bama-online.com set signature=\"~/.sig/ninja\" send-hook ~tmm@solo.com set signature=\"~/.sig/ninja\" send-hook ~ts.shears@bodymiraculous.com set signature=\"~/.sig/ ninja\"
    430. :0 * From:.*molly@bama-online.com .friends.molly/ :0 * From:.*mm@solo.com .friends.molly/ :0 * From:.*s.shears@bodymiraculous.com .friends.molly/
    431. :0 * From:.*molly@bama-online.com .friends.molly/ :0 * From:.*mm@solo.com .friends.molly/ :0 * From:.*s.shears@bodymiraculous.com .friends.molly/ whitelist_from molly@bama-online.com whitelist_from mm@solo.com whitelist_from s.shears@bodymiraculous.com
    432. The Future
    433. Email::Corpus
    434. Email::Corpus::Email
    435. Email::Corpus::Addr
    436. Email::KB::Headers
    437. Metadata Plugin
    438. Bounce Classifier
    439. pep@perl.org http://emailproject.perl.org/
    440. Thank You!

    + Ricardo SignesRicardo Signes, 3 years ago

    custom

    5724 views, 0 favs, 0 embeds more stats

    Ready? 250 OK! Everybody loves email, right? Right! more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 5724
      • 5724 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 184
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Groups / Events