Send emails via slack

rasa-core

(Aiana Goyal) #1

Hey guys, I’ve added a custom action of sending emails to Rasa. While deploying it on Slack, it’s not performing the action. Is it possible to send mails via Slack


(Souvik Ghosh) #2

Where are you executing your action, i suppose where you have hosted your Rasa server, check the settings of your server if you are allowed to send mails. could be firewall


(Aiana Goyal) #3

hey. It’s working through command prompt line. I’m able to send mails while running python script of dialogue management model and training online method. But not through Slack

Also, I’ve built this as a ‘custom’ action in actions.py file


(Souvik Ghosh) #4

when you run your slack connector, it runs up a flask server and opens a web hook for slack on the other hand console channel does not run up any server instead runs a python executable and hence it could be that your configuration for sending out emails differs. I am not sure if slack has anything to do with that

which library are you using to send out mails? Can you try flask-mail

I suppose you are sending out the email from the custom action class in actions.py


(Aiana Goyal) #5

Oh. possibly that. I’m using email library of Python. I’ll try out flask-mail


(Aiana Goyal) #6

I tried with flask-mail as well. Still not working. It’s running on two different servers, right? One process shouldn’t have affected the other.


(Souvik Ghosh) #7

your custom actions should execute at the server from where you will shoot your mails, I am not sure of your setup , how exactly are you connecting to slack? Ngrok?

usually the slack connector at rasa spins up a flask server that should be able to send out mails.