Forum Replies Created

Viewing 1 replies (of 1 total)
  • chrisschertenlieboci

    (@chrisschertenlieboci)

    Hey @yehudah I’ve been getting this same error when trying to manually send emails using wp_mail() in php.

    Password Reset and other emails seem to be sending fine. Using the “Send a Test Email” worked just fine.

    I’m using SMTP and SendGrid. I’m executing the php from a “code snippets” plugin which just dumps the code into functions.php on the server side. I’m even setting a from header on the email like the another person suggested.

    Code:
    $headers[] = ‘Content-Type: text/html; charset=UTF-8’;
    $headers[] = ‘From: [email protected]’;
    wp_mail(‘[email protected]’, ‘anything’, ‘anything’, $headers);
    wp_mail(‘[email protected]’, ‘tell chris you got this’, ‘anything’, $headers);

    Full stack trace:
    Fatal error: Uncaught Error: Call to a member function getFromEmailAddress() on null in /var/www/html/wp-content/plugins/post-smtp/Postman/PostmanWpMail.php:165 Stack trace: #0 /var/www/html/wp-content/plugins/post-smtp/Postman/PostmanWpMail.php(148): PostmanWpMail->createNewMessage() #1 /var/www/html/wp-content/plugins/post-smtp/Postman/PostmanWpMail.php(50): PostmanWpMail->processWpMailCall() #2 /var/www/html/wp-content/plugins/post-smtp/Postman/PostmanWpMailBinder.php(117): PostmanWpMail->send() #3 /var/www/html/wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()’d code(2): wp_mail() #4 /var/www/html/wp-content/plugins/code-snippets/php/snippet-ops.php(446): eval() #5 /var/www/html/wp-content/plugins/code-snippets/php/snippet-ops.php(534): execute_snippet() #6 /var/www/html/wp-includes/class-wp-hook.php(287): execute_active_snippets() #7 /var/www/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters() #8 /var/www/html/wp-includes/plugin.php(484): WP_Hook->do_action() #9 /var/www/html/wp-setting in /var/www/html/wp-content/plugins/post-smtp/Postman/PostmanWpMail.php on line 165

    Would really love a workaround. Happy to provide any other requested info.

Viewing 1 replies (of 1 total)