[Debconf6-data-commit] r181 - mail

Andreas Schuldei andreas at costa.debian.org
Sun Dec 25 20:24:31 UTC 2005


Author: andreas
Date: 2005-12-25 20:24:31 +0000 (Sun, 25 Dec 2005)
New Revision: 181

Added:
   mail/massmailing.pl
Log:
new

Added: mail/massmailing.pl
===================================================================
--- mail/massmailing.pl	2005-12-25 20:22:14 UTC (rev 180)
+++ mail/massmailing.pl	2005-12-25 20:24:31 UTC (rev 181)
@@ -0,0 +1,152 @@
+#!/usr/bin/perl -w
+
+###
+# sending out acceptance or reject mails to all proposal submitters
+###
+
+use strict;
+use Mail::Mailer;
+
+my $infile = "talks-accepted-rejected";
+
+sub send_mail {
+    my $mailer       = shift;
+    my $proposal_ref = shift;
+    my $body         = shift;
+
+    $mailer->open( From => "committee at debconf.org",
+		   To   => $proposal_ref->{email},
+		   Subject => "Your proposal for DebConf6 about \"$proposal_ref->{topic}\""
+		  ) 
+	or die "Can't open: $!\n";    
+    print $mailer $body;
+    $mailer->close();
+
+}
+
+sub pick_body {
+    my $proposal_ref = shift;
+    
+    my %p = %{$proposal_ref}; #for shorter form in the text
+    
+    my $body;
+
+    if ( $p{status} eq "Accepted") {
+	$body = <<"EOF"
+(This is a mass-mailing. If you want to speak to a human, reply
+to this mail, please!) 
+
+Hi $p{author}!
+
+Marry Christmas!
+
+Thank you for submitting the proposal for a $p{talk_type} about
+"$p{topic}". 
+
+We are happy to accept it into the main track of DebConf6.
+
+If you need travel support, please book your tickets as soon as
+possible to get good prices and tell us how much you need until
+Jan 15 at the lastest or let us know if you need more time.
+
+Please submit your paper for the $p{talk_type} until the 2006-04-06
+via the comas webinterface (and also choose a fitting, preferably
+DFSG free license). 
+
+Afterwards the papers will still needed to be checked, (perhaps)
+commented on, typeset and printed and bound before finally being
+shipped to the conference place. This deadline is a hard one.  We
+can not push it further back.
+
+This year we have again a dedicated, qualified person who can
+help you with both preparing/rehearsing your talk and getting
+your paper into shape. Feel free to drop Meike Reichle
+<meike\@debconf.org> a mail if you would like to get a
+second oppinion on your paper or would like to make arrangements
+for going over your talk ahead of time.
+
+Should you have special requirements for your talk (besides a
+beamer) which could take more preparation then e.g. fonts
+installed on the presentation notebook, please let us know.
+
+We look forward to meeting you at Debconf6 in Mexico!
+
+The academic committee
+EOF
+
+    }
+    else {
+
+    $body = <<"EOF"
+(This is a mass-mailing. If you want to speak to a human, reply
+to this mail, please!)·
+
+Hi $p{author}!
+
+Merry Christmas!
+
+Thank you for submitting the proposal for a $p{talk_type} about
+"$p{topic}". 
+
+Unfortunatly we were unable to accept all proposals and
+had to chose between 70 talks for the main track.
+
+We would like to ask you to consider giving your proposal as a
+less formal Birds-of-a-Feathers (BoF) session. Unlike last year
+these BoFs will take place in smaller rooms suitable for
+discussions and brainstorming rather then frontal presentations or
+talks.
+
+If you want to hold a BoF about 
+"$p{topic}", 
+please use the Comas webinterface to change the type of your
+presentation from "$p{talk_type}" to "BoF" and perhaps alter your
+proposal\'s text to fit the new form. This text will show up in the
+proceedings as the description of the BoF session.
+
+Should you decide that you would not like to give a BoF instead,
+please retract your proposal via Comas.
+
+We look forward to meeting you at Debconf6 in Mexico!
+
+The academic committee
+EOF
+    }
+    
+    return $body;
+}
+
+sub read_proposal {
+    my $line = shift;
+
+    my ($id, $topic, $name, $email, $status, $talk_type) = split(/\s+\|\s+/, $line);
+    
+    $name =~ /(.*) ([^ ]+)$/;
+    my $first = $2;
+    my $last  = $1;
+    my $author = "$2 $1";
+
+    my %proposal = (id        => $id,
+		    topic     => $topic,
+		    name      => $name,
+		    email     => $email,
+		    status    => $status,
+		    talk_type => $talk_type,
+		    author    => $author,
+		    );
+    
+    return \%proposal;
+}
+
+my $mailer = Mail::Mailer->new("sendmail");
+
+open( my $in, $infile )   or die "Couldn't read $infile: $!";
+
+while ( <$in> ) {
+    chomp;
+    my $proposal_ref = read_proposal($_ );
+    my $body = pick_body ($proposal_ref);
+    send_mail ( $mailer, $proposal_ref, $body );
+}
+
+close $in;


Property changes on: mail/massmailing.pl
___________________________________________________________________
Name: svn:executable
   + *




More information about the Debconf6-data-commit mailing list