(no subject)
Dec. 6th, 2003 10:37 amLately I've been posting DHP invitations from my work email address, the NVidia one. If you respond to me at that address, I'm 90% guaranteed not to be able to reply on the weekend of the party. That means that if you want to contact me about party stuff, DO NOT just reply to the invitation. You can "reply all", which will actually only send to me (at my regular non-work address) and Brian since everybody else is carefully BCC'd.
Anybody know a good simple Unix mailer that will allow you to send mail from a script and add a really large number of names to the BCC list? I'm at a loss so far, and it seems like an easy problem. I've been too lazy to look up the SMTP protocol and write one myself, but this is getting to be a pain. And SMTP can't be that hard.
Alternately, one of the various generous folk who've talked about setting up a real mailing list for this might come through on that, but I'm not holding my breath :-)
Anybody know a good simple Unix mailer that will allow you to send mail from a script and add a really large number of names to the BCC list? I'm at a loss so far, and it seems like an easy problem. I've been too lazy to look up the SMTP protocol and write one myself, but this is getting to be a pain. And SMTP can't be that hard.
Alternately, one of the various generous folk who've talked about setting up a real mailing list for this might come through on that, but I'm not holding my breath :-)
no subject
Date: 2003-12-06 10:57 am (UTC)http://www.python.org/doc/current/lib/SMTP-example.html
Also, you could set the reply-to header, which I think most mail clients respect these days.
no subject
Date: 2003-12-06 04:16 pm (UTC)I am planning on re-arranging mailling lists, but I can take another
one into consideration as I do that.
no subject
Date: 2003-12-07 01:01 am (UTC)no subject
Date: 2003-12-07 02:14 am (UTC)Does this mean I need to find another medium that we both share and tag you there?
why not sendmail?
Date: 2003-12-15 12:52 am (UTC)% sendmail -i -t < msg-to-send.text
and edit msg-to-send.text to have all your recipients on the Bcc: line?
it has to be message with valid headers and body, like:
if your sendmail has a limit on the Bcc: line length (it's unlikely you'd hit it, but hey...) then you could easily write a script to break it up. heck, even xargs and a perl one-liner could do it, frighteningly enough...
--plambert
Re: why not sendmail?
Date: 2003-12-15 02:09 am (UTC)Several people have just offered to set it up, saying it'd take no serious time to do. I'm tempted to take one of them up on it, but that also requires more ongoing effort on my part to maintain it. I'll try what you suggest above. If it works, it'll be the most painless way, going forward.
Well, okay, something based on a message template and a perl s/foo/blah/ one-liner will probably be what I do since I maintain the list of addresses in a text file. But, y'know, pretty much what you have above, but without the manual substitutions.
That's assuming it all works, naturally. There's probably some reason that every GUI or GUIish mail program I've tried on Unix chokes on enormous BCC lines, but damned if I know what it is. The one time I've successfully sent the invite from my machine, I used (gag) Netscape Mail, and just let it sit for many minutes.
It worked, though, eventually.
no subject
Date: 2003-12-21 12:10 pm (UTC)#!/usr/bin/perl -w use strict; use Net::SMTP; use Time::Format qw(%time); $SMTP_HOST = 'mailserver.com'; my $addresses; open (FH, 'addresses.txt', 'r'); while () { push @$addresses, chomp $_ }; close FH; send_it('me@foo.com',$addresses,'Big Announcement!', 'Meet me at the witching hour'); sub send_it { my ($from, $to, $subj, $msg) = @_; my $smtp = Net::SMTP->new($SMTP_HOST, Debug => 1); if(!defined($smtp) || !($smtp)) { print "SMTP ERROR: Unable to open smtp session.\n"; return 0; } $smtp->mail($from); $smtp->recipient(@$to); my $header = <<EOH MIME-Version: 1.0 From: $from To: [hidden] Date: $time{'Day, dd Mon yyyy hh:mm:ss tz'} Subject: $subj EOH $smtp->data($msg); $smtp->quit; }Let me know how that works out for you.