[Foss4g2008loc] bulk e-mailing for mass marketing of FOSS4G2008

Paul Ramsey pramsey at refractions.net
Wed Jan 23 13:06:02 EST 2008


I used a perl bulk mailing module and this short program to turn it  
over.  Worked a treat, for both marketing spam and mass-mails to  
conference goers, allowed mail merge and everything.



#!/usr/bin/perl

if ( @ARGV < 3 ) {

   die "Usage: $0 <datafile.txt> <mailfile.txt> 'Subject Line'\n\n";

}

$datafile = $ARGV[0];
$mailfile = $ARGV[1];
$subject = $ARGV[2];

$message = `cat $mailfile`;
$datatmp = "/tmp/datafile-$$.txt";

open( DATA, $datafile );
open( OUT, ">$datatmp" );

$linecount = 0;
while( <DATA> ) {
   $linecount++;
   if ( $linecount == 1 ) {
     chop;
     @line = split(/\t/);
     for( my $i = 0; $i < @line; $i++ ) {
       if ( $line[$i] =~ /email/ ) {
         $line[$i] = "BULK_EMAIL";
       } else {
         $line[$i] = "<<" . $line[$i] . ">>";
       }
     }
   }
   else {
     print OUT;
   }
}

close(DATA);
close(OUT);

use Mail::Bulkmail::Dynamic "./massmail.cfg";

my $bulk = Mail::Bulkmail::Dynamic->new(
   "merge_keys" => \@line,
   "force80" => 0,
   "merge_delimiter" => "\t",
   "LIST" => $datatmp,
   "From" => "FOSS4G 2007 <info\@foss4g2007.org>",
   "Subject" => $subject,
   "Message" => $message,
   "server_file" => "./server.file"
   ) || die Mail::Bulkmail::Dynamic->error();

$bulk->bulkmail() || die $bulk->error;


On Jan 23, 2008, at 7:38 AM, Tim Sutton wrote:

> Hi
>
> I was about to mention that it would be nice to eat our own dog
> food...sourceforge has 178 matches for 'bulk mailer':
> http://tinyurl.com/3dfe42 one of which I'm sure must meet your
> needs...179 if you include Pauls offering...
>
> Regards
>
> Tim
>
> 2008/1/23, Paul Scott <pscott at uwc.ac.za>:
>>
>> On Wed, 2008-01-23 at 16:38 +0200, Gavin Fleming wrote:
>>> On Paul R's recommendation to spam lots
>>> (http://wiki.osgeo.org/index.php/FOSS4G2007_Lessons_Learned#How_People_Heard_about_FOSS4G2007 
>>>  ), I had this recommendation for a bulk emailer called WorldCast (http://www.fairlogic.com/ 
>>> ). What did 2007 use?
>>>
>>>
>>
>> I wrote a bulk mailer a while back for a newsletter system that you
>> could use as well. It is free software, and you can always ask the
>> developer for features without waiting in line... ;)
>>
>> --Paul
>>
>>
>>
>> All Email originating from UWC is covered by disclaimer
>> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
>>
>> _______________________________________________
>> FOSS4G2008LOC mailing list
>> FOSS4G2008LOC at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/foss4g2008loc
>>
>>
>
>
> -- 
> Tim Sutton
> QGIS Project Steering Committee Member - Release  Manager
> Visit http://qgis.org for a great open source GIS
> openModeller Desktop Developer
> Visit http://openModeller.sf.net for a great open source ecological
> niche modelling tool
> Home Page: http://tim.linfiniti.com
> Skype: timlinux
> Irc: timlinux on #qgis at freenode.net
> _______________________________________________
> FOSS4G2008LOC mailing list
> FOSS4G2008LOC at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/foss4g2008loc



More information about the FOSS4G2008LOC mailing list