FightForSub / FFS-Api

Fight For Subs API
https://ffs-events.zerator.com/
GNU General Public License v3.0
16 stars 7 forks source link

Adding enpoint to send email to all (or only validated) participants of an event #7

Open Hartorn opened 6 years ago

Hartorn commented 6 years ago

Could be great to have an endpoint taking an event id, a body containing the content of an email, and to send it to all participants.

Would be customisable on the front, so discord server, and so on could be added.

EmrysMyrddin commented 6 years ago

Can you add more details about what you are actually expecting ? I can work on this. Do you already have an idea of the way you want to send mails ? A private SMTP server or a solution like MailJet could be good ?

AlexMog commented 6 years ago

@EmrysMyrddin A service already exists in the API to send emails, it just need some configs in the configs.properties file ;) There's an example of mail sending with it: https://github.com/AlexMog/FFS-Api/blob/master/src/main/java/tv/zerator/ffs/api/v1/resources/LoginResource.java#L165

EmrysMyrddin commented 6 years ago

@AlexMog Great ! thanks for pointing this out :-)

I will make a first simple endpoint allowing to send an emal to all participant. When you will be happy with that, I will work on some templating with variables.

AlexMog commented 6 years ago

It could be a good idea to add a filter system. For example add "status" to the query to send the email only to the users with this status, and if no status is set, send to all

EmrysMyrddin commented 6 years ago

Ok, I will do this. I imagine that this endpoint have to be accessible only by Admins and SuperAdmins ?