|
NAMENewsletter - A simple newsletter module!VERSIONVersion 0.033SYNOPSISThe backend module for the newsletter (newsletter.cgi) web interface. This module is a BETA Version. Copy the newsletter.cgi to your /cgi-bin/ directory and adapt it. Maybe you have to change the pathsPerhaps a little code snippet. use Newsletter; my $foo = Newsletter->new(); ... More docu is coming ... FUNCTIONStemplate( %params ) list( %params ) body( %params ) sender( %params ) send( ) EXAMPLE#!/usr/bin/perl -w use strict; use Newsletter; my $news = Newsletter->new; $news->template( path => '/tmp/newsletter' ); $news->template( file => { # u need path => 'test/myHeader.html', type => 'html', is => 'header', # here starts the optional Params name => 'My Header Name', schema => 'My First Template', embedded => '/tmp/opera.jpg' # here starts self defined Params # ... } ); $news->template( use => { schema => 'My First Template' } ); $news->template( use => { is => 'header', name => 'My Header Name' } ); $news->template( use => { is => 'header', filename => 'myHeader.txt' } ); #print $news->template( # use => { # is => 'header', # filename => 'myHeader.html' # }, # remove => 1 #); #print $news->{'senderHeader'}->{'HTML'}, "\n"; ####################################################### # TEST List ####################################################### $news->list( path => '/tmp/newsletter/list' ); $news->list( list => { name => 'the-top@foo.bar' } ); $news->list( member => { # u need listname => 'the-top@foo.bar', mail => 'foo@bar.bla' } ); $news->list( member => { # u need listname => 'the-top@foo.bar', mail => 'hello@world.bla' } ); $news->list( remove => { # remove one member listname => 'the-top@foo.bar', mail => 'hello@world.bla' } ); $news->list( remove => { # remove whole list listname => 'the-top@foo.bar', } ); ############################################ # Test Send ############################################ $news->list( empty => 1, path => '/tmp/newsletter/list' ); $news->list( list => { name => 'news@vienna-marathon.com', } ); $news->list( member => { # u need listname => 'news@vienna-marathon.com', mail => 'dominik@soft.uni-linz.ac.at' } ); $news->body( path => '/tmp/newsletter/body' ); $news->body( subject => 'A test mail!', file => { path => 'test/myBody.html', type => 'html', embedded => '/tmp/opera.jpg' } ); $news->body( file => { path => 'test/myBody.txt', type => 'text', } ); $news->sender( smtp => 'soft.uni-linz.ac.at' ); my $sender = $news->buildMail(); #print $sender->as_string; #print "\n"; $news->send(); ONLINEVisit:L<http://www.pervasive.jku.at/About_Us/Staff/Hochreiter/Newsletter> Here you can see the example script from the cgi directory working: L<http://www.pervasive.jku.at/About_Us/Staff/Hochreiter/Newsletter/cgi/newsletter.cgi> AUTHORDominik Hochreiter, "<dominik at soft.uni-linz.ac.at>"TESTSSuccessfully tested on Linux (Slackware 10.2) and Solaris (SunOS 5.8). This Module got developed for www.vienna-marathon.comBUGSPlease report any bugs or feature requests to "bug-newsletter at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Newsletter>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORTYou can find documentation for this module with the perldoc command.perldoc Newsletter You can also look for information at:
ACKNOWLEDGEMENTSCOPYRIGHT & LICENSECopyright 2006 Dominik Hochreiter, all rights reserved.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |