Monocle icon indicating copy to clipboard operation
Monocle copied to clipboard

SMTP Support as Notification

Open DavePlater opened this issue 7 years ago • 6 comments

Is it possible to just have basic support for SMTP as a notification method? I tried to make twitter happen last night, but theyre require a phone number for an account to make an OAUTH credential set? It would be much more simple if it just had SMTP support, then I could have it email me? (Also, how to I add the enhancement label?)

DavePlater avatar Mar 21 '17 13:03 DavePlater

This isn't a priority for me, I would welcome a pull request though. If anyone wants to take it on, I'd recommend using a library that uses asyncio like aiosmtplib.

But I'd also suggest trying PushBullet. There are no API limits if you use a channel.

Noctem avatar Mar 30 '17 04:03 Noctem

I have not been able to figure out any of the other notification types, so i'm stuck just randomly looking at the map

DavePlater avatar Mar 30 '17 16:03 DavePlater

Pushbullet is probably the easiest to setup. Have you tried it?

baskettcase avatar Mar 30 '17 16:03 baskettcase

I admit I mostly just tried to get twitter working and failed. I made a dummy twitter account but without a cell# tied to it, you dont get API access. I just looked into pushbullet and decided it was not what i was looking for. I dont want to have to install apps on my phone and link my accounts to everything.

DavePlater avatar Mar 30 '17 20:03 DavePlater

I implemented this in my working copy.

I noticed a lot of duplicate and overlapping code spread across the existing notification types, though. I'm thinking of creating a PR to clean some of that up before contributing my SMTP implementation. @Noctem, how does that sound to you?

ghost avatar Apr 06 '17 23:04 ghost

I've been using my implementation for the past few days. It works well, and when used with an email-to-SMS gateway, makes notifications very convenient.

My current code follows the patterns in the notification.py module, which I normally try to do in order to minimize changes, but I don't like it in this case because it worsens the existing inconsistencies and code duplication in that module. I have therefore started refactoring notification.py. (See #214.) Once I have it cleaned up, I can create a pull request for SMTP.

ghost avatar Apr 09 '17 17:04 ghost