Discussions of development and use of the Sup email client
 help / color / mirror / Atom feed
* serial mail instead of Bcc
@ 2015-01-29  8:37 Martin Bähr
  2015-01-29 20:39 ` [sup] " Matthieu Rakotojaona
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Bähr @ 2015-01-29  8:37 UTC (permalink / raw)
  To: supmua

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/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup] serial mail instead of Bcc
  2015-01-29  8:37 serial mail instead of Bcc Martin Bähr
@ 2015-01-29 20:39 ` Matthieu Rakotojaona
  0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Rakotojaona @ 2015-01-29 20:39 UTC (permalink / raw)
  To: supmua

[-- Attachment #1: Type: text/plain, Size: 2566 bytes --]

Excerpts from Martin Bähr's message of 2015-01-29 09:37:28 +0100:
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-29 20:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29  8:37 serial mail instead of Bcc Martin Bähr
2015-01-29 20:39 ` [sup] " Matthieu Rakotojaona

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox