Title: Undefined variable $attachments.
Last modified: May 6, 2021

---

# Undefined variable $attachments.

 *  Resolved [Stonehenge Creations](https://wordpress.org/support/users/duisterdenhaag/)
 * (@duisterdenhaag)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-attachments/)
 * Hi,
 * I get these notices in my debug.log with every email:
 *     ```
       Undefined variable: attachments in .../smtp-mailer/main.php on line 472
       Undefined variable: attachments in .../smtp-mailer/main.php on line 473
       ```
   
 * The isset() check on line 468 does not define $attachments if the array key is
   not set in the $atts array.
    -  This topic was modified 5 years, 1 month ago by [Stonehenge Creations](https://wordpress.org/support/users/duisterdenhaag/).
      Reason: Typo

Viewing 1 replies (of 1 total)

 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-attachments/#post-14410107)
 * [@duisterdenhaag](https://wordpress.org/support/users/duisterdenhaag/), The code
   was actually copied from WordPress. I have just released an update for it.

Viewing 1 replies (of 1 total)

The topic ‘Undefined variable $attachments.’ is closed to new replies.

 * ![](https://ps.w.org/smtp-mailer/assets/icon-128x128.png?rev=1312656)
 * [SMTP Mailer](https://wordpress.org/plugins/smtp-mailer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smtp-mailer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smtp-mailer/)
 * [Active Topics](https://wordpress.org/support/plugin/smtp-mailer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smtp-mailer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smtp-mailer/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Noor Alam](https://wordpress.org/support/users/naa986/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/undefined-variable-attachments/#post-14410107)
 * Status: resolved