• I’m trying to get the wp_mail() function to replace the mail() function. I visited:

    http://codex.wordpress.org/Function_Reference/wp_mail

    And try their example:

    <?php
       $attachments = array(WP_CONTENT_DIR . '/uploads/file_to_attach.zip');
       $headers = 'From: My Name <myname@mydomain.com>' . "\r\n";
       wp_mail('test@test.com', 'subject', 'message', $headers, $attachments);
    ?>

    But I’m getting the error: “Call to undefined function wp_mail()”.

  • The topic ‘wp_mail Function – Undefined Function’ is closed to new replies.