Newsletter plugin (sort of)

Yes I know that.
But I prefer to create portable code, if that is possible.
The effort here is minimal and therefore I would never give it up.

My first attempts led to errors which I could not solve immediately. Hence my reference here.

1 Like

I agree with @HeinerEF here. I started writing short tags in template examples in Kirby 1 but soon realized that not every user is able to modify the PHP.ini settings and switch to short tags. So I’d always prefer to write any plugin or extension with regular tags just for a more global compatibility.

3 Likes

I will change that, thanks for the feedback :wink:

Hi,
can you provide an exmaple (with fake data) on how to fill the config.php?

//c::set('phpmailer_path', '');
c::set('phpmailer_host', '');
c::set('phpmailer_user', '');
c::set('phpmailer_passwd', '');
//c::set('phpmailer_phpbin', '');
//c::set('phpmailer_localpath', '');
//c::set('phpmailer_logfile', '');
//c::set('phpmailer_page', '');
c::set('phpmailer_blog', ''); // set your blog root here for post selection
c::set('phpmailer_from', '');
c::set('phpmailer_fromName', '');
c::set('phpmailer_ReplyTo', '');
c::set('phpmailer_ReplyToName', '');
//c::set('phpmailer_', '');
//c::set('phpmailer_', '');

Thanks!

Hi! This should do. :slight_smile:
No need to use all of those parameters.

To be honest, I did not develop this plugin for quite a while. So this may be quite buggy. :wink:

/* -----------------  newsletter  config ---------------------- */

//c::set('phpmailer_path', '');
c::set('phpmailer_host', 'smtp.gmail.com');
c::set('phpmailer_user', 'the.gmail-email@gmail.com');
c::set('phpmailer_passwd', 'gmail-password');

//c::set('phpmailer_phpbin', '');
//c::set('phpmailer_localpath', '');
//c::set('phpmailer_logfile', '');
//c::set('phpmailer_page', '');
c::set('phpmailer_blog', 'top-page-of-yourblog-you-want-to-use-this-for');
c::set('phpmailer_from', 'the.gmail-email@gmail.com');
c::set('phpmailer_fromName', 'Display Name');
c::set('phpmailer_ReplyTo', 'reply-to-email@gmail.com'');
c::set('phpmailer_ReplyToName', 'Reply to Display Name');

Is it possible that in the https://github.com/andi242/kirbycms-newsletter-addon on Github I miss the blueprints?

@tutchi Don’t you trust your eyes :wink:?

I see. Sorry. :slight_smile:
Thanks for your time.

@tutchi, I guess you don’t need a blueprint for these pages apart from the default one, that’s probably why there was none added.

Indeed. No Blueprints needed.

I just release an alpha version of my mailjet plugin for kirby. maybe you guys want to give me some feedback? I would appreciate it very much. Thanks.