Previously I have wrote lj2mail - a script which gets fresh posts from LiveJournal and emails them to the list of recepients. I have tried to avoid sending same items over and over again, but failed. The script was implemented with the help of LiveJournal API (LJ::Simple Perl module).
I got annoyed by that script repeating some items (mess with publishing date), so I wrote a different one. rss2mail simply gets the RSS feed, parses it and emails items as individual messages to the list of recepients. I guess that caching RSS item link is much better than LiveJournal’s publishing date. Also, rss2mail is much more flexible. It can be used with any RSS feed, not only LiveJournal’s. I have tried to make it as generic as possible. If it doesn’t work with other feeds, just check the fields of the RSS feed it uses.
9 responses so far ↓
1 Randy Charles Morin // Jun 17, 2005 at 1:05 am
Try R|mail it doesn’t require any knowledge of perl. By just adding a javascript to your blog page, the entire thing just works.
2 Leonid Mamchenkov // Jun 17, 2005 at 7:47 am
And the URL is… :)
3 Seraphim // Feb 28, 2006 at 7:29 pm
Is it possible to have this script utilize sendmail instead of smtp?
How would one go about doing that? Im n00b :D
4 Leonid Mamchenkov // Mar 1, 2006 at 12:22 am
Seraphim,
Yes, it is possible to use Sendmail instead of SMTP. Just change the line:
my $mailer = Mail::Mailer->new('smtp',Server=>$smtp_server);to
my $mailer = Mail::Mailer->new('sendmail');and it should work. Refer to the documentation of Mail::Mailer Perl module if you have a problem.
5 Seraphim // Mar 3, 2006 at 1:59 pm
This is a great script, On my server I set it up as a cron job and the script will continue to send email even though the urls are in the .sent file. in the end of recieving 6000 email I looked at the .sent file and saw hundrend of duplicate entries. what am I doing wrong?
6 Leonid Mamchenkov // Mar 3, 2006 at 11:31 pm
Seraphim,
this sounds really strange. Are you sure about the dups - maybe there is some difference - upper/lower case, slashes at the end of URLs or something like this?
7 XaraNet Blog » Blog Archive » RSS2Mail - die 2te // Jul 14, 2006 at 10:02 am
[...] Misst, hat doch nicht so auf Anhieb geklappt. Ich habs mit dem Perl-Script von Leonid Mamchenkov versucht. Komischerweise sendet er aber teilweise Beiträge doppelt, obwohl ich dienatürlich schon kenne. Hab den Fehler auf Anhieb nicht gefunden und such daher irgendwas neues. Wenn jemand ein Script kennt, freu ich mich natürlich. Am liebsten in PHP oder alternativ Perl. Ich hab einiges in Python gefunden - mag ich aber nicht so gerne und werde ich als letztes ausprobieren [...]
8 Jamie // Nov 10, 2006 at 9:54 pm
Hello, just thought you might like to know I took your rss2mail script and converted it to an rss2ascii script.
It reformats the HTML into a sort of plain-text report and sends it’s output to stdout, where it can be fed into the standard input of other programs (like inews or sendmail) I’m using it to read plain-text versions of RSS on a local news system.
RSS plaintext converter
9 Leonid Mamchenkov // Nov 12, 2006 at 3:45 am
Thanks for the info, Jamie. It’s nice to know that the script was useful to someone else besides me. :)
Leave a Comment