I'm setting up e-newsletter plugin. Are tehre any security


I’m setting up e-newsletter plugin. Are tehre any security disadvantages to using php mail or wp mail?


  • Kasia Swiderska
    • Support nomad

    Hi cornelius_butler,

    I don’t think there are security disadvantages – both functions are very similar. Disadvantage for mail() is that this function is very often blocked on servers, so it’s better to use SMTP.

    There are some differences for this functions:

    wp_mail() is a pluggable function: It can be replaced by plugins. That’s useful in cases where the regular mail() doesn’t work (good enough), for example when you need extra authentication details.

    wp_mail() uses PHPMailer by default, a sophisticated PHP class which offers a lot of useful preprocessing and workarounds for cases where mail() is too simple (UTF-8 encoded subject lines, attachments and so on).

    Kind regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.