SosthenG / yourls-notifier

Plugin for Yourls sending notifications to Discord
GNU General Public License v3.0
7 stars 1 forks source link

Notifier for SMTP #3

Open fklnc94 opened 3 months ago

fklnc94 commented 3 months ago

Hello, first of all thank you to my friend for inspiring me for my need.

I rewrote the plugin's notification system and made some changes so that it sends an email via SMTP. I also made a small addition to the click and new shorter creation notification, as well as a small addition to send a notification when a change is made to existing links.

I wanted to share it for those who need it.

  1. Go to yourls root directory where the composer.json file is located and install PHPMailer by typing the command sudo composer require phpmailer/phpmailer.

  2. Replace the plugin.php file with the file I shared below by correcting the .json extension to .php (file upload restriction...)

plugin.json

  1. Activate the plugin and configure the plugin from the admin panel.

  2. Test it.

SosthenG commented 3 months ago

Hello,

Thank you for that contribution!

However the goal of this plugin was to be a notifier capable of using different channels. I added only discord because it's what I needed personally, but it would be nice to have email supported by the plugin alongside Discord and maybe others later.

If you feel like it you could write a pull request adding this without removing the discord notifier (and modifying the plugin settings page to choose which channel to use). If not I'll try to do it when I can! I'm on holidays right now so I can't test your version or do that right now.

fklnc94 commented 3 months ago

Happy holidays my friend, unfortunately (yay) I'm on vacation too. So whichever of us comes back first...

By the way, a small update, the option to receive notifications for deletions has been added.

plugin.json