Discussions of development and use of the Sup email client
 help / color / mirror / Atom feed
From: Matthieu Rakotojaona <matthieu.rakotojaona@gmail.com>
To: supmua <supmua@googlegroups.com>
Subject: Re: [sup] serial mail instead of Bcc
Date: Thu, 29 Jan 2015 21:39:26 +0100	[thread overview]
Message-ID: <1422562269-sup-7151@kpad> (raw)
In-Reply-To: <1422520391-sup-3@email.archlab.tuwien.ac.at>

[-- 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 --]

      reply	other threads:[~2015-01-29 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29  8:37 Martin Bähr
2015-01-29 20:39 ` Matthieu Rakotojaona [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422562269-sup-7151@kpad \
    --to=matthieu.rakotojaona@gmail.com \
    --cc=supmua@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox