"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "send-reminders" between
email-reminder-0.8.0.tar.gz and email-reminder-0.8.1.tar.gz

About: Email-Reminder lets define events to be reminded of by email via cronjob (with GUI).

send-reminders  (email-reminder-0.8.0):send-reminders  (email-reminder-0.8.1)
skipping to change at line 94 skipping to change at line 94
use Encode; use Encode;
use Getopt::Long; use Getopt::Long;
use MIME::Base64; use MIME::Base64;
use MIME::QuotedPrint; use MIME::QuotedPrint;
use Pod::Usage; use Pod::Usage;
use EmailReminder::EventList; use EmailReminder::EventList;
use EmailReminder::Utils; use EmailReminder::Utils;
use Date::Manip qw(ParseDate UnixDate); use Date::Manip qw(ParseDate UnixDate);
binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8");
# Default preferences # Default preferences
my $PREFERENCE_FILE = '/etc/email-reminder.conf'; my $PREFERENCE_FILE = '/etc/email-reminder.conf';
my %preferences; my %preferences;
$preferences{"send_reminders"} = 1; $preferences{"send_reminders"} = 1;
$preferences{"smtp_server"} = 'localhost'; $preferences{"smtp_server"} = 'localhost';
$preferences{"smtp_ssl"} = 0; $preferences{"smtp_ssl"} = 0;
$preferences{"smtp_username"} = ''; $preferences{"smtp_username"} = '';
$preferences{"smtp_password"} = ''; $preferences{"smtp_password"} = '';
$preferences{"mail_from"} = 'root@localhost'; $preferences{"mail_from"} = 'root@localhost';
read_config(); read_config();
skipping to change at line 161 skipping to change at line 164
my $user_name = shift; my $user_name = shift;
my $user_email = shift; my $user_email = shift;
unless ($user_email) { unless ($user_email) {
return 0; return 0;
} }
my $to = $user_email; my $to = $user_email;
$to = "$user_name <$user_email>" if ($user_name); $to = "$user_name <$user_email>" if ($user_name);
print "--> Emailing '$to':\n".encode("UTF-8", $subject."\n\n".$message) if $ verbose; print "--> Emailing '$to':\n$subject\n\n$message" if $verbose;
unless ($simulate) { unless ($simulate) {
my $smtp_server = ''; my $smtp_server = '';
if ($preferences{"smtp_server"} =~ /^([A-Za-z_0-9\-\/.]+)$/) { if ($preferences{"smtp_server"} =~ /^([A-Za-z_0-9\-\/.]+)$/) {
$smtp_server = $1; $smtp_server = $1;
} }
my $smtp = undef; my $smtp = undef;
if ($preferences{"smtp_ssl"}) { if ($preferences{"smtp_ssl"}) {
eval 'use Net::SMTP::SSL'; eval 'use Net::SMTP::SSL';
die "Couldn't load module : $!" if ($@); die "Couldn't load module : $!" if ($@);
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)