• Resolved epiron

    (@epiron)


    Hi,

    The plugin shows the following message:

    WP Mail SMTP has detected incorrect “wp_mail” function location. Usually, this means that emails will not be sent successfully!

    What does it mean and what do I have to do to fix it?

Viewing 15 replies - 1 through 15 (of 31 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi @epiron,

    in WP Mail SMTP v3.5 we introduced the check, if the core WordPress function wp_mail, which is responsible for sending emails, is overwritten.

    If it is, that usually means that our plugin can’t function correctly, that’s why we display the admin notice, if we detect the overwrite.

    In the admin notice you mentioned, is there an overwrite path noted, at the end of the notice? Is there also a name of a plugin that is overwriting it?
    Could you please let us know what the overwrite path is for your case? If there is any sensitive information in the path, you can replace it with X’s.

    Are you maybe using a local WP site (for development), hosted on a windows machine?

    Please let us know as much details as possible, so we can investigate if this is a false positive in your case or if we have to improve the check in our plugin.

    Take care!

    Thread Starter epiron

    (@epiron)

    The complete message is:

    WP Mail SMTP has detected incorrect “wp_mail” function location. Usually, this means that emails will not be sent successfully!

    Current function path: xxxxx\wp-includes\pluggable.php:182

    There is no name for a plugin. I hosted WordPress on Windows. Also, I have to mention the email is working fine.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @epiron,

    I can see that the path mentioned is the correct, WP Core path. Everything looks OK for you, so if the emails are sending OK, this notice will not cause any issues for you. This is just a check and some parts of the path is not matching with what our plugin is expecting.

    Could you please help us and check the values of these PHP and WP constants on your site:
    DIRECTORY_SEPARATOR
    ABSPATH
    WPINC

    Again if there are any sensitive details you can replace them with x’s.

    That will help us narrow down the potential Windows host issue, for this new check and we can resolve it in our next plugin update.

    If possible, could you please share which web hosting you are using, so we might also perform testing there ourselves.

    Thank you and take care!

    Thread Starter epiron

    (@epiron)

    I installed it manually on the IIS web server

      DIRECTORY_SEPARATOR: \
      ABSPATH: C:\root-of-wordpress/
      WPINC: wp-includes

    I’m also seeing the same notification on an instance running locally via xampp.

    like wise
    and obviously I’m not touching WP core files so I did not overwritten anything

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @epiron,

    thank you for sharing the constant values.

    Hi @qlstudio and @benoithamet.

    Thank you for sharing your information.

    This check will not affect your WP site or the email sending, it’s just a check which displays the admin notice if the expected path for that function does not match.

    It looks like the check does not function correctly on Windows servers (or on Windows local development environments) and we will fix this in the next plugin version.

    For now you can disable the notice with this code snippet:

    
    add_filter( 'wp_mail_smtp_core_wp_mail_function_incorrect_location_notice', '__return_false' );
    

    Thank you and have a nice day.

    Hello,
    I am facing the same issue. My site is in localhost, using OceanWP theme, and haven’t use any separate constants.

    When sending test mail, it shows a success message, but do not receive the mail.

    Please suggest how to solve.

    Edited :
    I am using GMail smtp. If recipient is a gmail id, then it is getting delivered, but if it is a different email id, other than gmail, then it is not getting delivered.

    • This reply was modified 2 years, 4 months ago by wpdevs2022.
    Joakim

    (@noboxjoakim)

    I’m having issues with 2.1.3 on multiple client pages as well, all running on Linux based servers. Most of them using Mailgun API for sending but other variants exist as well.

    I can send test e-mails but when trying the forms (multiple form plugins as Contact Form 7, WPForms, Gravity Forms) I get nothing delivered.

    • This reply was modified 2 years, 4 months ago by Joakim.
    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @wpdevs2022 and @noboxjoakim,

    this notice (“incorrect ‘wp_mail’ function location”) that we are discussing in this support thread has no affect on email sending that you are describing. Please open a new support ticket here and our team will try and help you out (provide as much information as you can about your problem, so we can help you better/faster).

    Take care!

    Hi, I am facing the same issue for 10 days.
    Emails are not sent. Website on IIS. Other than updates the website is not changed.

    WP Mail SMTP has detected incorrect “wp_mail” function location. Usually, this means that emails will not be sent successfully!

    Current function path: xxxxxxxxxxxxxxxxx\wp-includes\pluggable.php:182

    Is there a solution?

    Thanks

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @drors01,

    your issue of email sending is not caused by this admin notice. This admin notice is just a check if the path of the WP core function “wp_mail” has changed, nothing else. For windows servers we will fix this check and you will no longer see this notice, but that will not help with your issue for emails not being sent.

    Please send a Email Test in our plugin (WP Mail SMTP > Tools > Email Test) and open a new support ticket here with the error you get from the Email Test. We’ll try to help you out.

    Take care!

    Having the same problem, 4 different Windows servers running on IIS. Exact same error message and cannot send out any emails.

    EDIT*** Looks like I had to remove the connections in WP Mail, after I added them back in, I was able to receive emails. I am still however getting that error message.

    • This reply was modified 2 years, 4 months ago by gavinr2022.
    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @gavinr2022,

    For now you can disable the notice with this code snippet:

    add_filter( 'wp_mail_smtp_core_wp_mail_function_incorrect_location_notice', '__return_false' );

    Thank you and have a nice day.

    Hello,

    I am having a serious problem, after updating the plugin this error appears and I can’t find the problem:

    WP Mail SMTP has detected incorrect “wp_mail” function location. Usually, this means that emails will not be sent successfully!

    Current function path: D:\home\site\wwwroot\wp-includes\pluggable.php:182

    How can I solve it?

    Thanks.

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘incorrect “wp_mail” function location’ is closed to new replies.