Kjetil Kjernsmo > AxKit-XSP-Sendmail > AxKit::XSP::Sendmail



Annotate this POD


Open  0
View/Report Bugs
Module Version: 1.5   Source  


AxKit::XSP::Sendmail - Simple SMTP mailer tag library for AxKit eXtensible Server Pages.


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


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

    AxAddXSPTaglib AxKit::XSP::Sendmail


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. This taglib is identical to the Cocoon taglib of the same name, albeit in a different namespace..

Tag Reference ^


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


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


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


Defines a 'To' field in the outgoing message. Multiple instances are allowed. By default this taglib will remove leading and trailing spaces from the value <sendmail:to> contains. If you need to turn this off, simply set the trim attribute to 'no'. The same can be done for all header fields.


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


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


Defines the subject of the message.


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


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';


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.


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


Defines the body of the outgoing message.


This tag is interchangable with <sendmail:body>.


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



When sending email fails, or an address is invalid, this taglib will throw an exception, which you can catch with the AxKit exceptions taglib.


Kip Hampton, khampton@totalcinema.com

Kjetil Kjernsmo, kjetilk@cpan.org has taken over maintainership of this module as of 1.41.


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.


AxKit, Mail::Sendmail, Email::Valid

syntax highlighting: