SVN::Hooks::Mailer.3pm

Langue: en

Autres versions - même langue

Version: 2010-01-07 (ubuntu - 24/10/10)

Section: 3 (Bibliothèques de fonctions)

NAME

SVN::Hooks::Mailer - Send emails after successful commits.

SYNOPSIS

This SVN::Hooks plugin sends notification emails after successful commits. It's deprecated. You should use SVN::Hooks::Notify instead.

The emails contain information about the commit like this:

         Subject: [TAG] Commit revision 153 by jsilva
 
         Author:   jsilva
         Revision: 153
         Date:     2008-09-16 11:03:35 -0300 (Tue, 16 Sep 2008)
         Added files:
             trunk/conf/svn-hooks.conf
         Deleted files:
             trunk/conf/hooks.conf
         Updated files:
             trunk/conf/passwd
         Log Message:
             Setting up the conf directory.
 
 

It's active in the "post-commit" hook.

It's configured by the following directives.

EMAIL_CONFIG()

SVN::Hooks::Mailer uses Email::Send to send emails.

This directive allows you to chose a particular mailer to send email with.

         EMAIL_CONFIG(Sendmail => '/usr/sbin/sendmail');
         EMAIL_CONFIG(SMTP => 'smtp.example.com');
         EMAIL_CONFIG(IO => '/path/to/file');
 
 

The first two are the most common. The last can be used for debugging.

EMAIL_COMMIT(HASH_REF)

This directive receives a hash-ref specifying the email that must be sent. The hash may contain the following key/value pairs:
match => qr/Regexp/
The email will be sent only if the Regexp matches at least one of the files changed in the commit. If it doesn't exist, the email will be sent always.
from => 'ADDRESS'
The email address that will be used in the From: header. If it doesn't exist, the from address will usually be the user running Subversion.
to => 'ADDRESS, ...'
The email addresses to which the email will be sent. This key is required.
tag => 'STRING'
If present, the subject will be prefixed with '[STRING] '.
cc, bcc, reply_to => 'ADDRESS, ...'
These are optional email addresses used in the respective email headers.
diff => [STRING, ...]
If this key is specified, the email will also contain the GNU-style diff of changed files in the commit. If its value is an ARRAY REF its values will be passed as extra options to the 'svnlook diff' command. There are three of them:
"--no-diff-deleted"
Do not print differences for deleted files
"--no-diff-added"
Do not print differences for added files.
"--diff-copy-from"
Print differences against the copy source.

AUTHOR

Gustavo Chaves, "<gnustavo@cpan.org>"

BUGS

Please report any bugs or feature requests to "bug-svn-hooks-checkmimetypes at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SVN-Hooks>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.
     perldoc SVN::Hooks
 
 

You can also look for information at:

RT: CPAN's request tracker

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=SVN-Hooks>

AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/SVN-Hooks>

CPAN Ratings

<http://cpanratings.perl.org/d/SVN-Hooks>

Search CPAN

<http://search.cpan.org/dist/SVN-Hooks>

Copyright 2008-2009 CPqD, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.