Dan Collins wrote:
I'm using "transport=File" to store reports in directory and run this script
from it once a day, because gmail accepts only 500 messages to one recipient
per day, and smokers often go over the limit.
That is exactly what I do, only I do it with about 15 different email
addresses and I randomly switch between them, removing them from the
rotation if I get an error. While I acknowledge that the sort
{rand<.5} is poor practice, I don't care because this way was easier
at the time. This way I can run two or three or thirty of these and
they'll all not try to get the same report at the same time.
[...]
$error=$reporter->errstr();
$error ? (print $error."\n") && (delete $addresses[$addid]) &&
((@addresses=grep {$_} @addresses) || die) : undef;
}
Sometimes google sends "Server Busy" error message, which doesn't require to remove sending address from the list, next
retry is usually successful. You may also want to "redo" in case of error, so this file is going to be sent (once) again.
--
Serguei Trouchelle