Skip to contentSkip to conversation

b4 should batch email

DISCUSSION Tom Tromey 1 participant 1 message Feb 13, 2023

lore
Share & tools
lore

Tom Tromey

author
#0 lore raw

My mail provider doesn't like when I send too many messages in one session, so I got the appended error message.

"git send-email" doesn't have this problem, because I do:

[sendemail]
...
smtpBatchSize = 10

Perhaps b4 could use this same mechanism. FWIW it was also a bit weird to me that I had to set b4.send-series-to, when I already have sendemail.to configured.

I'm using:

prentzel. b4 --version
0.12.0

thanks,
Tom

Traceback (most recent call last):
File "/home/tromey/.local/bin/b4", line 8, in <module>

    sys.exit(cmd())
  File "/home/tromey/.local/lib/python3.10/site-packages/b4/command.py", line 360, in cmd
    cmdargs.func(cmdargs)
  File "/home/tromey/.local/lib/python3.10/site-packages/b4/command.py", line 86, in cmd_send
    b4.ez.cmd_send(cmdargs)

File "/home/tromey/.local/lib/python3.10/site-packages/b4/ez.py", line 1532, in cmd_send
sent = b4.send_mail(smtp, send_msgs, fromaddr=fromaddr, patatt_sign=sign,
File "/home/tromey/.local/lib/python3.10/site-packages/b4/__init__.py", line 3429, in send_mail
smtp.sendmail(fromaddr, destaddrs, bdata)
File "/usr/lib64/python3.10/smtplib.py", line 887, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
smtplib.SMTPSenderRefused: (421, b'too many messages in this connection', '[email protected]')