#!/usr/bin/perl -w
use Net::SMTP_auth;
my $repos=$ARGV[0];
my $rev=$ARGV[1];
my $change_data=`/usr/local/bin/svnlook diff -r $rev /home/svn/masterpanel/`;
$smtp = Net::SMTP_auth->new('smtp.example.com');
$smtp->auth('CRAM-MD5', 'some_login', 'some_pass');
$smtp->mail('svn@example.ru');
$smtp->to('masters@example.com');
$smtp->data();
$smtp->datasend("Subject: svn.example.com\n");
$smtp->datasend('From: svn@example.com');
$smtp->datasend("\n");
$smtp->datasend("$repos\n");
$smtp->datasend("$rev\n");
$smtp->datasend("$change_data\n");
$smtp->dataend();
$smtp->quit;
Source: https://habr.com/ru/post/55719/
All Articles