Support » Plugin: PHP Code for posts » The wp-mail function strangely works

  • Hello

    The wp-mail function works strangely.
    Exemple :

    global $current_user;
    $nsw_user_mail   =  $current_user->user_email;
    $nsw_objet       =  'Hello!';
    $nsw_message     =  'Contenu du message';
    $nsw_email       =  wp_mail(nsw_user_mail, $nsw_objet, $nsw_message);
    return nsw_email;

    In PHP Code for post
    This function returns permanently 3 mails.

    In an external code, it returns me 1 email

    Do you have an idea ?

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Author Jamie Fraser


    It could be that the code is being ran more than once? how many times are you using it within the post?

Viewing 1 replies (of 1 total)
  • The topic ‘The wp-mail function strangely works’ is closed to new replies.