[phpmailer] Add SMTP-Integration of PHPMailer addon #834

Merged
M-arcus merged 4 commits from addon/phpmailer into develop 2019-04-02 15:56:58 +02:00
M-arcus commented 2019-03-28 13:58:50 +01:00 (Migrated from github.com)
See https://github.com/friendica/friendica/issues/5047
MrPetovan commented 2019-03-28 14:21:51 +01:00 (Migrated from github.com)

Thanks for your work! They are several points I would like you to change about config naming/accessing.

First of all, configuration should be accessed with Config::get('category', 'key').

Secondly, addon-specific configuration are stored in their own category, in this case it should be:

Config::get('phpmailer', 'enabled')          // instead of $a->config['system']['smtp']
Config::get('phpmailer', 'smtp_host')        // instead of $a->config['system']['smtp_server']
Config::get('phpmailer', 'smtp_port')        // instead of $a->config['system']['smtp_port']
Config::get('phpmailer', 'smtp_port_secure') // instead of $a->config['system']['smtp_port_secure']
Config::get('phpmailer', 'smtp_username')    // instead of $a->config['system']['smtp_username']
Config::get('phpmailer', 'smtp_password')    // instead of $a->config['system']['smtp_password']
Config::get('phpmailer', 'from')             // instead of $a->config['system']['smtp_from']
Config::get('phpmailer', 'domain')           // instead of $a->config['system']['smtp_domain']
Config::get('phpmailer', 'secure')           // instead of $a->config['system']['smtp_secure']
Config::get('config', 'sitename')            // instead of $a->config['sitename']

I have more precise change request that i will include in the files themselves.

Thanks for your work! They are several points I would like you to change about config naming/accessing. First of all, configuration should be accessed with `Config::get('category', 'key')`. Secondly, addon-specific configuration are stored in their own category, in this case it should be: ```php Config::get('phpmailer', 'enabled') // instead of $a->config['system']['smtp'] Config::get('phpmailer', 'smtp_host') // instead of $a->config['system']['smtp_server'] Config::get('phpmailer', 'smtp_port') // instead of $a->config['system']['smtp_port'] Config::get('phpmailer', 'smtp_port_secure') // instead of $a->config['system']['smtp_port_secure'] Config::get('phpmailer', 'smtp_username') // instead of $a->config['system']['smtp_username'] Config::get('phpmailer', 'smtp_password') // instead of $a->config['system']['smtp_password'] Config::get('phpmailer', 'from') // instead of $a->config['system']['smtp_from'] Config::get('phpmailer', 'domain') // instead of $a->config['system']['smtp_domain'] Config::get('phpmailer', 'secure') // instead of $a->config['system']['smtp_secure'] Config::get('config', 'sitename') // instead of $a->config['sitename'] ``` I have more precise change request that i will include in the files themselves.
MrPetovan (Migrated from github.com) requested changes 2019-03-28 14:29:49 +01:00
MrPetovan (Migrated from github.com) left a comment

On top of the change requests, please add a default configuration file for this addon that will explicit the configuration values this addon expects and will be loaded via the load_config hook.

You can take example from the geonames addon.

On top of the change requests, please add a default configuration file for this addon that will explicit the configuration values this addon expects and will be loaded via the `load_config` hook. You can take example from the `geonames` addon.
M-arcus commented 2019-03-28 14:58:04 +01:00 (Migrated from github.com)

I will makes the requested changes to this addon.

The old config getters where used for an older friendica version, I will update them

I will makes the requested changes to this addon. The old config getters where used for an older friendica version, I will update them
M-arcus (Migrated from github.com) reviewed 2019-04-01 19:06:37 +02:00
M-arcus (Migrated from github.com) reviewed 2019-04-01 19:07:14 +02:00
M-arcus (Migrated from github.com) reviewed 2019-04-01 19:07:38 +02:00
M-arcus (Migrated from github.com) reviewed 2019-04-01 19:07:58 +02:00
M-arcus (Migrated from github.com) reviewed 2019-04-01 19:07:59 +02:00
M-arcus (Migrated from github.com) reviewed 2019-04-01 19:08:13 +02:00
M-arcus commented 2019-04-01 19:08:57 +02:00 (Migrated from github.com)

@MrPetovan I am now using the new Config::get function

@MrPetovan I am now using the new `Config::get` function
MrPetovan (Migrated from github.com) requested changes 2019-04-01 19:57:40 +02:00
M-arcus (Migrated from github.com) reviewed 2019-04-02 11:26:09 +02:00
MrPetovan (Migrated from github.com) approved these changes 2019-04-02 13:16:05 +02:00
MrPetovan commented 2019-04-02 13:16:29 +02:00 (Migrated from github.com)

Have you tried this addon? With secure/insecure settings?

Have you tried this addon? With secure/insecure settings?
M-arcus commented 2019-04-02 14:14:23 +02:00 (Migrated from github.com)

@MrPetovan I used it for 5 months inside a docker container for my friendica server

@MrPetovan I used it for 5 months inside a docker container for my friendica server
MrPetovan commented 2019-04-02 16:03:35 +02:00 (Migrated from github.com)

Thank you for your work!

Thank you for your work!
Sign in to join this conversation.
No description provided.