Masatoshi Mizuno > Egg-Release-Mail-0.06 > Egg::View::Mail::Plugin::SaveBody

Download:
Egg-Release-Mail-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Egg::View::Mail::Plugin::SaveBody? - The content of the transmission of mail is preserved in the file.

SYNOPSIS ^

  package MyApp::View::Mail::MyComp;
  use base qw/ Egg::View::Mail::Base /;
  
  ...........
  .....
  
  __PACKAGE__->setup_plugin('Lot');

DESCRIPTION ^

It is MAIL plugin to preserve the content of the transmission of mail in the file.

When 'SaveBody' is passed to 'setup_plugin' method, it is built in.

It is necessary to set up it and Egg::Model::FsaveDate.

  % vi /path/to/MyApp/lib/MyApp/config.pm
   ...........
   MODEL => ['FsaveDate'],

Some behavior changes if Egg::View::Mail::Plugin::Lot is built in.

A large amount of files of the same content are made when preserving it with Egg::View::Mail::Plugin::Lot at the transmission though the content of mail is always usually preserved. Then, if the destination looks similar, the preservation of the content of mail is finished once. The problem of no preservation of the content of the following transmission etc. happens when another content is sent to the same destination in the same process because this is not in the content of mail and is checked by it in the destination.

When 'save_body_path' is set by the argument and the configuration of 'send' method, it comes to be preserved in a place different from the place that Egg::Model::FsaveDate originally preserves.

  $mail->send(
    body => .......,
    save_body_path => '/path/to/output',
    );

METHODS ^

send, mail_send

It competes simultaneously with other components that use these methods when using it. Please adjust the order of building in.

  __PACKAGE__->setup_plugin(qw/
    PortCheck
    SaveBody
    Lot
    /);

is_savebody

PATH to the preserved file is stored.

After 'send' method is called, it comes to be able to take this out.

  $mail->send( to=> '.....', body => '......' );
  
  print $mail->is_savebody . '¤ËÊݸ¤µ¤ì¤Þ¤·¤¿¡£';

lot_name

It is a method of the setup when using it at the same time as Egg::View::Mail::Plugin::Lot.

ID of SHA1 generated with the value of 'to' is stored.

savebodys

It is a method of the setup when using it at the same time as Egg::View::Mail::Plugin::Lot.

Already it has transmitted or the data for the judgment has already been stored.

SEE ALSO ^

Egg::Release, Egg::View::Mail, Egg::Model::FsaveDate, Egg::View::Mail::Plugin::Lot, Digest::SHA1,

AUTHOR ^

Masatoshi Mizuno <lushe@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: