Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Ulises Nicolini

    (@ulyssesplus)

    Well, before search and debug code, i found the problem at wp_mail core wordpress function.

    https://core.trac.ww.wp.xz.cn/browser/tags/5.4/src/wp-includes/pluggable.php#L170

    At line 216, get an error “could not instantiate phpmailer” ¿Cant’ find the previus require?

    $phpmailer = new PHPMailer( true );

    Then i remove all phpmailer reference and use this simple code.

    $header = ‘From: ‘ .$from_email. “\r\n” .
    ‘Reply-To: ‘.$from_email . “\r\n” .
    ‘X-Mailer: PHP/’ . phpversion();
    return mail($to,$subject,$message,$header);

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use on the site?

    Thread Starter Ulises Nicolini

    (@ulyssesplus)

    Only Updraft Plus, is a very simple site! The wp_mail function have some trouble. I dont understand, the files ‘class-phpmailer.php’ and ‘class-smtp.php’ are in correct path, but the execution hang at ‘new PHPMailer’. ¡?

    require_once ABSPATH . WPINC . ‘/class-phpmailer.php’;
    require_once ABSPATH . WPINC . ‘/class-smtp.php’;

    $phpmailer = new PHPMailer( true );

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘500 Internal Server error when submit form’ is closed to new replies.