Title: SendGrid: PHP Fatal error
Last modified: February 22, 2023

---

# SendGrid: PHP Fatal error

 *  Resolved [Žygimantas](https://wordpress.org/support/users/meras/)
 * (@meras)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/sendgrid-php-fatal-error/)
 * [22-Feb-2023 12:52:45 UTC] PHP Notice: Undefined variable: email in /public_html/
   wp-content/plugins/post-smtp/Postman/Postman-Mail/PostmanSendGridMailEngine.php
   on line 206
   [22-Feb-2023 12:52:45 UTC] PHP Fatal error: Uncaught Error: Call 
   to a member function addAttachment() on null in /public_html/wp-content/plugins/
   post-smtp/Postman/Postman-Mail/PostmanSendGridMailEngine.php:206Stack trace:
 * **0 public_html/wp-content/plugins/post-smtp/Postman/PostmanWpMail.php(236): 
   PostmanSendGridMailEngine->send()**
 * **1 public_html/wp-content/plugins/post-smtp/Postman/PostmanWpMail.php(60): PostmanWpMail-
   >sendMessage()**
 * **2 /public_html/wp-content/plugins/post-smtp/Postman/PostmanWpMailBinder.php(
   121): PostmanWpMail->send()**
 * **3 /public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.
   php(688): wp_mail()**
 * **4 /public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email-
   customer-on-hold-order.php(91): WC_Email->send()**
 * **5 /public_html/wp-content/plugins/post-smtp/Postman/Postman-Mail/PostmanSendGridMailEngine.
   php on line 206**

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

 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/sendgrid-php-fatal-error/#post-16495278)
 * [@meras](https://wordpress.org/support/users/meras/) Hi,
 * I hope you are doing well.
 * Let me look into it, can you please share the diagnostic test report of Post 
   SMTP or share the PHP version of your website?
 * Thanks
 *  Thread Starter [Žygimantas](https://wordpress.org/support/users/meras/)
 * (@meras)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/sendgrid-php-fatal-error/#post-16495400)
 * Hey, [@haseeb0001](https://profiles.wordpress.org/haseeb0001/)
   I can’t make a
   diagnostic report, because switching to another plugin.My PHP 7.4. Plugin was
   configured to send emails via SendGrid. WooCommerce version: 7.4.0Server info:
   Apache/2.4.54 (Debian)MySQL version: 5.5.5-10.4.20-MariaDB-1:10.4.20+maria~buster-
   logWebsite hosted by Cloudways.Hope it helps.
 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/sendgrid-php-fatal-error/#post-16498450)
 * Hi [@meras](https://wordpress.org/support/users/meras/)
 * I hope you are doing well.
 * We have fixed this issue on our Beta version; please download it from [here](https://downloads.wordpress.org/plugin/post-smtp.2.4.2-beta.2.zip),
   test it, and let me know.
 * Thanks
 *  Thread Starter [Žygimantas](https://wordpress.org/support/users/meras/)
 * (@meras)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/sendgrid-php-fatal-error/#post-16498487)
 * [@haseeb0001](https://profiles.wordpress.org/haseeb0001/) 
   I’m glad you found
   the cause of the problem and fixed the code.
 * Sorry – can’t test it.
 * Regards!
 *  [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/sendgrid-php-fatal-error/#post-16501526)
 * [@meras](https://wordpress.org/support/users/meras/)
 * Thanks for updating us; we have also released the updated version of our plugin.
 * Thanks

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

 The topic ‘SendGrid: PHP Fatal error’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Delivery and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/sendgrid-php-fatal-error/#post-16501526)
 * Status: resolved