Title: PHP Filter to set Settings?
Last modified: January 21, 2020

---

# PHP Filter to set Settings?

 *  [Erik Molenaar](https://wordpress.org/support/users/erikmolenaar/)
 * (@erikmolenaar)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/php-filter-to-set-settings/)
 * Hi!
 * Thanks for this awesome fork!
 * Is there a **filter** available to set type “Default” and mailer type to “PostSMTP”?
 * I want to prevent outgoing e-mails on my development servers. I could trigger
   this filter e.g. when WP_DEBUG is active or under another PHP condition.
 * Looking forward to your reply. Thanks!
 * Kind regards
    Erik Molenaar – a big Post SMTP fan!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/php-filter-to-set-settings/#post-12350341)
 * Hi,
 * Thank you for your kind words.
 * `define( 'POST_SMTP_RUN_MODE', 'log_only' );`
 * This will just log, and will not send emails.
    There isn’t a way to set mail 
   service.
 *  Thread Starter [Erik Molenaar](https://wordpress.org/support/users/erikmolenaar/)
 * (@erikmolenaar)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/php-filter-to-set-settings/#post-12422089)
 * Hi [@yehudah](https://wordpress.org/support/users/yehudah/)
 * I noticed, while POST_SMTP_RUN_MODE is set to ‘log_only’, the logs still shows
   all emails as ‘Sent’. This is kinda confusing!
 * Why not set the status to ‘**Not sent (log_only)**‘? It would make much more 
   sense:
 * [⌊02.11.2020-15.17.25⌉⌊02.11.2020-15.17.25⌉[
 * I hope this improves your awesome plugin. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Filter to set Settings?’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Erik Molenaar](https://wordpress.org/support/users/erikmolenaar/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/php-filter-to-set-settings/#post-12422089)
 * Status: not resolved