NAME

Apache::AxKit::Language::XSP::Sendmail - Simple SMTP mailer tag library for AxKit eXtesible Server Pages.

SYNOPSIS

Add the sendmail: namespace to your XSP <xsp:page> tag:

<?xml-stylesheet href="." type="application/x-xsp"?>>
<xsp:page
     language="Perl"
     xmlns:xsp="http://www.apache.org/1999/XSP/Core"
     xmlns:sendmail="http://www.axkit.org/ns/sendmail"
>

And add this taglib to AxKit (via httpd.conf or .htaccess):

AxAddXSPTaglib Apache::AxKit::Language::XSP::Sendmail

DESCRIPTION

The XSP sendmail: taglib adds a simple SMTP mailer to XSP via Milivoj Ivkovic's platform-neutral Mail::Sendmail module. In addition, all email addresses are validated before sending using Maurice Aubrey's Email::Valid package.

Tag Reference

<sendmail:send-mail>

This is the required 'wrapper' element for the sendmail taglib branch.

<sendmail:smpthost>

The this element sets the outgoing SMTP server for the current message. If ommitted, the default set in Mail::Sendmail's %mailcfg hash will be used instead.

<sendmail:from>

Defines the 'From' field in the outgoing message. If ommited, this field defaults to value set in Mail::Sendmail's %mailcfg hash. Run perldoc Mall:Sendmail for more detail.

<sendmail:to>

Defines a 'To' field in the outgoing message. Multiple instances are allowed.

<sendmail:cc>

Defines a 'Cc' field in the outgoing message. Multiple instances are allowed.

<sendmail:bcc>

Defines a 'Bcc' field in the outgoing message. Multiple instances are allowed.

<sendmail:body>

Defines the body of the outgoing message.

EXAMPLE

my $mail_message = 'I'm a victim of circumstance!';

<sendmail:send-mail> <sendmail:from>curly@localhost</sendmail:from> <sendmail:to>moe@spreadout.org</sendmail:to> <sendmail:cc>larry@porcupine.com</sendmail:cc> <sendmail:bcc>shemp@alsoran.net</sendmail:cc> <sendmail:body><xsp:expr>$mail_message</xsp:expr></sendmail:body> </sendmail:send-mail>

AUTHOR

Kip Hampton, khampton@totalcinema.com

COPYRIGHT

Copyright (c) 2001 Kip Hampton. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

AxKit, Mail::Sendmail, Email::Valid