Newsletter plugin development; help needed

Hi all. We have problem with incoming emails.

Action 0: Admin changes the status for a question (in plugiin admin panel): “Send emails? From NO (by default) to YES, and SAVES the changes.

Action number 1: We need to parse each file in the user/data/contact folder for a key:value. The program cycle will be: open the file in user/data/contact/contact-312.txt check if “subscribed: true”, then take “email:a@b.c”, save it to array variable; close the file. If there are more files in the user/data/contact folder, make the same action on other txt files.

Action number 2: We use collected data in variable from step 1, put it to prepared html.twig template and send letters to all the emails collected in step 1.

End of program.

Please ask your questions, and help us to develop this plugin as we need it for our project.

Sure, we do upload this plugin to grav repo. So, your help is very much appreciated.

We found h ttps://github.com/mcspronko/grav-plugin-newsletter ,but not well understood how it works and now we try to contact with a developer

Guys, your help is very much needed.

up

Hi @arrtych1,

FYI you can find a little tutorial by me of how to use https://github.com/mcspronko/grav-plugin-newsletter . The link is https://getgrav.org/forum#!/plugin-development:setup-newsletter-plugin .

Hi @sommerregen. I tried how you explained,but in admin panel clicking “Newsletter” button I have error message like “An exception has been thrown during the rendering of a template (“Directory name must not be empty.”) in “partials/newsletter_subscribers_list.html.twig” at line 8.”.How to correctly create subscriber by this plugin?

@arrtych1 You have to create a folder in user/data/newsletter/subscribers first in order to avoid that error.