soderlind / mu-mailpoet-smtp

Set the SMTP transport for MailPoet
0 stars 0 forks source link

Filter mailpoet_mailer_smtp_transport_agent is deprecated #1

Open websupporter opened 2 years ago

websupporter commented 2 years ago

Hello @soderlind, we have noticed, you are using the filter mailpoet_mailer_smtp_transport_agent in your plugin. This filter will be deprecate shortly. For more details please see https://github.com/mailpoet/mailpoet/pull/4125

Thank you and sorry for any inconvenience.

soderlind commented 2 years ago

@websupporter Thank you for notifying me on this issue.

I use the mailpoet_mailer_smtp_transport_agent to set the host, port, encryption, username and password: https://github.com/soderlind/mu-mailpoet-smtp/blob/main/mu-mailpoet-smtp.php#L43-L47

I don't see how I can do that using mailpoet_mailer_smtp_options (i.e. PHPMailer->SMTPOptions), please let me know how.

websupporter commented 2 years ago

I don't see how I can do that using mailpoet_mailer_smtp_options (i.e. PHPMailer->SMTPOptions), please let me know how.

Currently this is not possible actually. :thinking: We discovered your usage a bit to late and you used the filter in a way, we did not anticipate. Can you explain a bit more your use case, why you need to set the password etc. by code?

soderlind commented 2 years ago

I have a WordPress multisite that runs in several containers on Azure. Email auth details, for mailgun, are stored as secrects (env variables) and I use my plugin to set them. Manually adding them pr site is risky, i.e. easy to forget.

websupporter commented 2 years ago

Hi @soderlind, thanks for the feedback, that makes sense. We will discuss internally a new filter which could modify the PHPMailer configuration. I can't promise a timeline yet, but will keep you posted.

rodrigoprimo commented 2 years ago

Hi, @soderlind! Just FYI, we released a new version of MailPoet today that includes the new filters that were added in https://github.com/mailpoet/mailpoet/pull/4324.