-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
42 lines (23 loc) · 1.63 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Simple Python script to send reminder emails from XMPP
Build
To build debian package run
$ dpkg-deb --build prosody-emailremindercomponent-0.0.1/
Setup
/etc/prosody/emailreminder/config.yml
First of all copy the config_example.yml to config.yml in the same directory. The example config is commented and should be easy to set up
Make sure you add your JID to email mappings. Add more lines for more users.
email_addresses:
-jid: email address
If your JID does not exist in this list, then you will get no reply and no email will be sent
/etc/prosody/conf.d/emailreminder.cfg.lua
Component name and secret MUST match the values in config.yml
Now restart both prosody and emailreminder
$ sudo service restart prosody
$ sudo service restart emailremindercomponent
If you get problems set the logging_level in config.yml to debug, this will produce output from the script as well as smtplib.
Check the log file at /var/log/prosody/emailremindercomponent.log
Use
Send a standard XMPP message to the component_jid set in config.yml. This will send an email to the email address that is mapped against your JID in the config file.
The subject, by default is set to "Reminder <date time>". I had to introduce the date and time so gmail doesn't group the reminders. The email body is a copy of the XMPP message body.
I use emails as reminders all the time and wanted to quicker way to send them to a specific account. If your JID is setup in the email address mapping, you will get a reminder set / reminder failed confirmation message back. If no email mapping exists, no email or reply is sent.