AxKit-XSP-Sendmail

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    - Kjetil signs the distribution with his PGP key.

1.41
    - Kjetil Kjernsmo, kjetilk@cpan.org took over maintainership.
    - Added documentation for the subject tag.
    - Added a MANIFEST.SKIP
    - A bit of documentation cleanup and typo corrections.

1.4
    - Updated to AxKit 1.4 API
    - Robin's changes adding charset conversion and a few cleanups

0.06  Feb 13 2001
        - fixes to allow <xsp:expr> for all fields.
	- moved to new namespce.


0.05  Feb 08 2001
	- Public release.

0.01  Wed Jan 31 11:10:34 2001

Sendmail.pm  view on Meta::CPAN


    # we want a bad "from" header to be caught as a user error so we'll trap it here.
    $mailer_args->{From} ||= $Mail::Sendmail::mailcfg{from};

    unless ( Email::Valid->address($mailer_args->{From}) ) { 
        $address_errors .= "Address '$mailer_args->{From}' in 'From' element failed $Email::Valid::Details check. ";
    }

    # set the content-type
    $mailer_args->{'Content-Type'} = ($mailer_args->{'Content-Type'})? $mailer_args->{'Content-Type'} : 'text/plain';
    $mailer_args->{'Content-Type'} .= '; charset=';
    $mailer_args->{'Content-Type'} .= ($mailer_args->{'charset'})?      $mailer_args->{'charset'} : 'utf-8';

    # munge the text if it needs to be
    if ($mailer_args->{'charset'} and lc($mailer_args->{'charset'}) ne 'utf-8') {
        my $conv = Apache::AxKit::CharsetConv->new('utf-8',$mailer_args->{'charset'})
                or croak "No such charset: $mailer_args->{'charset'}";
        $mailer_args->{'message'} = $conv->convert($mailer_args->{'message'});
    }


    if ($address_errors) {
        croak "Invalid Email Address(es): $address_errors";
    }

    # all addresses okay? if so, send.
    

Sendmail.pm  view on Meta::CPAN

    }
    elsif ($tag eq 'bcc') {
        return q| push (@bcc_addrs, ''|;
    }
    elsif ($tag eq 'content-type') {
        return q| $mail_args{'Content-Type'} = ''|;
    }
    elsif ($tag eq 'content-transfer-encoding') {
        return q| $mail_args{'Content-Transfer-Encoding'} = ''|;
    }
    elsif ($tag eq 'charset') {
        return q| $mail_args{'charset'} = ''|;
    }
    elsif ($tag =~ /^(subject|message|from|body)$/) {
        $tag = "From" if $tag eq 'from';
        $tag = "message" if $tag eq 'body';
        return qq| \$mail_args{'$tag'} = "" |;
    }
    elsif ($tag eq 'smtphost') {
        return q| $mail_args{'smtp'} = "" |;
    }
    elsif ($tag eq 'header') {

Sendmail.pm  view on Meta::CPAN

=head2 C<E<lt>sendmail:content-typeE<gt>>

Defines the content-type of the body of the message (default: text/plain).

=head2 C<E<lt>sendmail:content-transfer-encodingE<gt>>

Defines the content-transfer-encoding of the body of the message. The
default depends on whether you have MIME::QuotedPrint available or not.
If you do, it defaults to 'quoted-printable', and if you don't to '8bit';

=head2 C<E<lt>sendmail:charsetE<gt>>

Defines the charset of the body of the message (default: utf-8). Your
system's iconv implementation needs to support converting from utf-8
to that character set otherwise sending email will fail.

=head2 C<E<lt>sendmail:headerE<gt>>

Allows you to add headers to the outgoing mail with the name specified
in the C<name> attribute.

=head2 C<E<lt>sendmail:bodyE<gt>>



( run in 0.263 second using v1.01-cache-2.11-cpan-4d50c553e7e )