Discussion:
[sup] serial mail instead of Bcc
Martin Bähr
2015-01-29 08:37:28 UTC
Permalink
hi,

i'd like to be able to send an email to a number of people without sharing the
addresses in the To: or Cc: headers. i can do that with Bcc: but i'd like the
people to note that the mail is for them personally. and not something copied
to them as fyi.

so what i would like to do is to have a mail sent to each recipient separately,
with their own address on the To: field.

greetings, martin.
--
eKita - the online platform for your entire academic life
--
chief engineer eKita.co
pike programmer pike.lysator.liu.se caudium.net societyserver.org
secretary beijinglug.org
mentor fossasia.org
foresight developer foresightlinux.org realss.com
unix sysadmin
Martin Bähr working in china http://societyserver.org/mbaehr/
--
You received this message because you are subscribed to the Google Groups "The Sup email client" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supmua+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supmua/1422520391-sup-3%40email.archlab.tuwien.ac.at.
For more options, visit https://groups.google.com/d/optout.
Matthieu Rakotojaona
2015-01-29 20:39:26 UTC
Permalink
Post by Martin Bähr
hi,
i'd like to be able to send an email to a number of people without sharing the
addresses in the To: or Cc: headers. i can do that with Bcc: but i'd like the
people to note that the mail is for them personally. and not something copied
to them as fyi.
so what i would like to do is to have a mail sent to each recipient separately,
with their own address on the To: field.
greetings, martin.
--
eKita - the online platform for your entire academic life
--
chief engineer eKita.co
pike programmer pike.lysator.liu.se caudium.net societyserver.org
secretary beijinglug.org
mentor fossasia.org
foresight developer foresightlinux.org realss.com
unix sysadmin
Martin BÀhr working in china http://societyserver.org/mbaehr/
Hello Martin,

That's an interesting use case. Just out of interest, is there an
MUA/MTA out there that does it ?

There is a "sendmail" hook that takes the message object to be sent [1]
and does whatever logic to actually handle delivery of said message.
You can write a hook that loops over the addresses in Bcc and sets the
addresses as a recipient before shelling out to sendmail/msmtp/your MTA
of choice. Very roughly, something like that (untested):

```
# The hook is responsible for _all_ sendings, so we also need to manage
# the "standard" sendings

bcc = message.bcc
message.bcc = []

IO.popen("msmtp -t --read-recipient-from") {|p| p.puts message}

# We need to save anything we modify, because we will put it back at the
# end so that sup saves a relevant message internally
to = message.to
cc = message.cc

# A specialized message, only for (each of) you
message.to = []
message.cc = []

bcc.each do |recipient|
message.to = [recipient]
IO.popen("msmtp -t --read-recipient-from") {|p| p.puts message}
end

message.to = to
message.cc = cc
message.bcc = bcc
```

As I write this, I realize that messages can't be encrypted to the
specified email address. To people more familiar with hooks: I don't
presume methods in the Redwood module are available ? Is it possible to
call CryptoManager.encrypt in a hook ?

[1] https://github.com/sup-heliotrope/sup/wiki/SendEmail
--
Matthieu Rakotojaona
--
You received this message because you are subscribed to the Google Groups "The Sup email client" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supmua+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supmua/1422562269-sup-7151%40kpad.
For more options, visit https://groups.google.com/d/optout.
Loading...