CGI-FormBuilder-Mail-FormatMultiPart

 view release on metacpan or  search on metacpan

README.txt  view on Meta::CPAN

       Default message format is 'plain' but you can specify 'html' or 'both',
       which results in a multipart message.  (Not sure if I have that right
       yet.)

       If HTML, can pass a stylesheet that is printed in-line, as well as
       arguments to HTML::QuickTable.  ('header' is ignored.)  The default
       style class is 'fb_mail' for all elements.  You can use a partial CSS
       spec to override this class's styles; defaults will otherwise still
       apply.

       Will attach all file uploads as multipart MIME attachments.  The file
       names are listed in the form data table.

       If it cannot be used, it will puke a warning message and die.

WRITING YOUR OWN PLUGIN
       This establishes a simple mail plugin implementation standard for your
       own mailresults() plugins.  The plugin should reside under the
       CGI::FormBuilder::Mail::* namespace.  It should have a constructor
       new() which accepts a hash-as-array of named arg parameters, including
       form => $form.  It should have a mailresults() object method that does

lib/CGI/FormBuilder/Mail/FormatMultiPart.pm  view on Meta::CPAN

    my ($form, $fbflds) = @{$self}{qw( form _fbflds )};

    return (    # return array of hashrefs suitable for MIME::Type attachments
        map { { Type        => 'AUTO', 
                FH          => $form->field($_),
                Filename    => $form->field($_),
                Id          => $_,
                Disposition => 'attachment',
              } 
            }
            grep { $fbflds->{$_}->value }   # only files actually uploaded
            $self->_file_field_names()
    );
}

sub _data_form {
    my ($self) = @_;

    # might be called twice in 'both', so no need to re-generate
    return $self->{_data_form} if exists $self->{_data_form};

lib/CGI/FormBuilder/Mail/FormatMultiPart.pm  view on Meta::CPAN

the message and that module's interface to Net::SMTP to send it.

Default message format is 'plain' but you can specify 'html' or 'both',
which results in a multipart message.  (Not sure if I have that right yet.)

If HTML, can pass a stylesheet that is printed in-line, as well as
arguments to HTML::QuickTable.  ('header' is ignored.)  The default
style class is 'fb_mail' for all elements.  You can use a partial CSS spec
to override this class's styles; defaults will otherwise still apply.

Will attach all file uploads as multipart MIME attachments.
The file names are listed in the form data table.

If it cannot be used, it will puke a warning message and die.

=head1 INSTALLATION

If you cannot use CPAN or PPM in the normal way, then:

    perl Build.PL
    ./Build



( run in 2.315 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )