11

We are using Slack as a team. However, there are also parties that are not part of our team but can participate via a mailing list.

I want to set up a channel in Slack, say #mailinglist. Whenever some team member posts a message into this channel I want an email going out to the mailinglist address.

2
  • There doesn't seem to be an outgoing email integration for now Aug 20, 2015 at 8:33
  • @Sathya Yes. That's the definition of integration though. I thought maybe something could be accomplished using the outgoing webhook. One could hook it up with a mail-sending PHP script.
    – koloman
    Aug 20, 2015 at 8:49

3 Answers 3

9

I solved this by using Slack's WebHook integration and let it call a little PHP script I wrote. The script takes the information and mails it.

The script is really simple and it's on GitHub.

2
  • How did you configure the webhook? Is it a slack command that you run like /mail This is the email body or can the mail script be triggered automatically by a keyword in a post?
    – Philipp
    Jul 3, 2017 at 11:46
  • 2
    Thanks for the suggestion of Slack's webhook integration and for the example. They worked perfectly for my requirements. Note that you will need to install it once PER-CHANNEL if you do not use keywords to trigger on "any channel". There is no "any channel" selection that will send an e-mail without a keyword (why not is beyond me...) I did try MailClark first but found it difficult to configure, confusing, and only free for one channel and then $9/month after that for each extra channel. Way beyond my budget anyway.
    – OttToyBoy
    Aug 28, 2017 at 19:15
6

There's a Slack integration for that: MailClark. It includes a Group mode, which does exactly what you describe. You can have a Slack channel with any combination of Slack and email users, where Slack messages are sent out as emails, and emails are received as Slack messages.

3
0

This was asked quite some time ago and I think the answers are not accurate anymore. MailClark will put the plug end of 2022 and not sure if the php example is still working.

But I ended checking what's the latest desire for slack how to tackle such a problem and I guess it is a Slack Bolt App: https://api.slack.com/bolt

I can recommend it.

It is surprisingly easy to do a simple text matching that can e.g. reverse your text. So "hello" becomes ""olleh".

E.g. here in Javascript.

// Reverse all messages the app can hear
app.message(async ({ message, say }) => {
  // Filter out message events with subtypes (see https://api.slack.com/events/message)
  if (message.subtype === undefined || message.subtype === 'bot_message') {
    const reversedText = [...message.text].reverse().join("");
    await say(reversedText);
  }
});

I guess from there it is easy to instead send the text as email (check sendgrid, mailgun, amazon SES) or start a Falcon 9 Rocket.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.