Title: Fatal error while sending exception
Last modified: October 25, 2022

---

# Fatal error while sending exception

 *  Resolved [steve456](https://wordpress.org/support/users/steve456/)
 * (@steve456)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-while-sending-exception/)
 * Hi
    I have found an issue in code while sending exception. File: fluent-smtp/
   app/Services/Mailer/BaseHandler.php Line: 273 Code: throw new \PHPMailer\PHPMailer\
   Exception($message, $code);
 * This gives fatal error while attempting to send email, and if it get an error
   message from the smtp host.
 * Exception should take one input argument whereas you are sending two arguments“
   message” and “code” in exception.
    Can you please update code and push a new 
   update for the plugin as this is a critical issue when smtp server return and
   error it generate internal server error 500.
 * to be precise here is the error
 *     ```
       PHP Fatal error:  Uncaught Error: Wrong parameters for PHPMailer\PHPMailer\Exception([string $message [, long $code [, Throwable $previous = NULL]]]) in /home/xyz/public_html/wp-content/plugins/fluent-smtp/app/Services/Mailer/BaseHandler.php:273
       Stack trace:
       #0 /home/xyz/public_html/wp-content/plugins/fluent-smtp/app/Services/Mailer/BaseHandler.php(273): Exception->__construct(Array, 400)
       #1 /home/xyz/public_html/wp-content/plugins/fluent-smtp/app/Services/Mailer/Providers/PepiPost/Handler.php(79): FluentMail\App\Services\Mailer\BaseHandler->handleResponse(Object(WP_Error))
       #2 /home/xyz/public_html/wp-content/plugins/fluent-smtp/app/Services/Mailer/Providers/PepiPost/Handler.php(23): FluentMail\App\Services\Mailer\Providers\PepiPost\Handler->postSend()
       #3 /home/xyz/public_html/wp-content/plugins/fluent-smtp/app/Services/Mailer/FluentPHPMailer.php(28): FluentMail\App\Services\Mailer\Providers\PepiPost\Handler->send()
       #4 /home/xyz/public_html/wp-content/plugins/fluent-smtp/app/Functions/helpers.php( in /home/xyz/public_html/wp-content/plugins/fluent-smtp/app/Services/Mailer/BaseHandler.php on line 273
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Support [Amimul Ihsan](https://wordpress.org/support/users/amimulihsanmahdi/)
 * (@amimulihsanmahdi)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-while-sending-exception/#post-16134968)
 * Hello [@steve456](https://wordpress.org/support/users/steve456/),
 * Thank you for letting us know. I have forwarded the information to our team. 
   Hopefully, they will take a further look and fix the issue soon.
 * Thank you

Viewing 1 replies (of 1 total)

The topic ‘Fatal error while sending exception’ is closed to new replies.

 * ![](https://ps.w.org/fluent-smtp/assets/icon.svg?rev=2458343)
 * [FluentSMTP - WP SMTP Plugin with Amazon SES, SendGrid, MailGun, Postmark, Google and Any SMTP Provider](https://wordpress.org/plugins/fluent-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fluent-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fluent-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/fluent-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fluent-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fluent-smtp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Amimul Ihsan](https://wordpress.org/support/users/amimulihsanmahdi/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-while-sending-exception/#post-16134968)
 * Status: resolved