Title: API Docs
Last modified: May 31, 2018

---

# API Docs

 *  [useStrict](https://wordpress.org/support/users/usestrict/)
 * (@usestrict)
 * [8 years ago](https://wordpress.org/support/topic/api-docs-2/)
 * Hi there,
 * I’m the developer of bbpress Notify (No-Spam) plugin, and in it I hook into PHPMailer
   to add attachments (inline or otherwise). As you replace PHPMailer with Zend,
   how can I hook into your code to add those attachments? Do you have some documentation
   I can refer to?
 * Cheers,
    Vinny

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

 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [8 years ago](https://wordpress.org/support/topic/api-docs-2/#post-10346670)
 * Hi
 * Nice to meet 🙂
 * Why you need to hook phpmailer ?
 *  Thread Starter [useStrict](https://wordpress.org/support/users/usestrict/)
 * (@usestrict)
 * [8 years ago](https://wordpress.org/support/topic/api-docs-2/#post-10346705)
 * My plugin sends out notifications of new bbPress topics/replies, and if there
   are inline images, it converts them to CID sources with `Content-disposition:
   inline` headers. I do this because some email clients don’t like external images
   and block them.
 * It’s pretty low level message manipulation, and it assumes that PHPMailer is 
   still available. When using Postman SMTP, the messages go out without the images.
   Reading your readme.txt explains why – you replace PHPMailer with Zend.
 * So in order for my plugin to play nicely with yours, I need to find a way to 
   attach the images to the message.
 * Cheers,
    Vinny
 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [8 years ago](https://wordpress.org/support/topic/api-docs-2/#post-10349388)
 * Hi [@usestrict](https://wordpress.org/support/users/usestrict/)
 * I have added the `phpmailer_init` hook to the class doing all the setup in my
   plugin and added the same methods you need.
 * My file and the relevant methods are located here:
    `/post-smtp/Postman/Postman-
   Mail/PostmanMessage.php`
 * In case it doesn’t work, just update me.
 * Please download the dev version here:
    [https://downloads.wordpress.org/plugin/post-smtp.zip](https://downloads.wordpress.org/plugin/post-smtp.zip)
 *  Thread Starter [useStrict](https://wordpress.org/support/users/usestrict/)
 * (@usestrict)
 * [8 years ago](https://wordpress.org/support/topic/api-docs-2/#post-10349495)
 * Thanks! Much appreciated! I’ll let you know if everything is working well.
 * Cheers,
    Vinny
 *  [yehudah](https://wordpress.org/support/users/yehudah/)
 * (@yehudah)
 * [8 years ago](https://wordpress.org/support/topic/api-docs-2/#post-10363076)
 * [@usestrict](https://wordpress.org/support/users/usestrict/)
 * Any news?
 *  Thread Starter [useStrict](https://wordpress.org/support/users/usestrict/)
 * (@usestrict)
 * [8 years ago](https://wordpress.org/support/topic/api-docs-2/#post-10363113)
 * Hi [@yehudah](https://wordpress.org/support/users/yehudah/),
 * The hook exists and my code is calling `->addEmbeddedImage()`, but the images
   aren’t attached to the message.
 * Also, I get the following errors:
 *     ```
       [04-Jun-2018 21:10:20 UTC] PHP Warning:  strpos() expects parameter 1 to be string, array given in /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-content/plugins/post-smtp/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Api/Message.php on line 132
       [04-Jun-2018 21:10:20 UTC] PHP Warning:  fopen() expects parameter 1 to be a valid path, array given in /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-content/plugins/post-smtp/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Api/Message.php on line 136
       [04-Jun-2018 21:10:20 UTC] PHP Warning:  strpos() expects parameter 1 to be string, array given in /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-content/plugins/post-smtp/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Api/Message.php on line 132
       [04-Jun-2018 21:10:20 UTC] PHP Warning:  fopen() expects parameter 1 to be a valid path, array given in /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-content/plugins/post-smtp/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Api/Message.php on line 136
       [04-Jun-2018 21:10:20 UTC] PHP Warning:  strpos() expects parameter 1 to be string, array given in /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-content/plugins/post-smtp/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Api/Message.php on line 132
       [04-Jun-2018 21:10:20 UTC] PHP Warning:  fopen() expects parameter 1 to be a valid path, array given in /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-content/plugins/post-smtp/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Api/Message.php on line 136
       [04-Jun-2018 21:10:20 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-content/plugins/post-smtp/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Api/Message.php:132) in /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-admin/post.php on line 198
       [04-Jun-2018 21:10:20 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-content/plugins/post-smtp/Postman/Postman-Mail/mailgun/vendor/mailgun/mailgun-php/src/Mailgun/Api/Message.php:132) in /Volumes/Sites/wordpress_plugins/wp_unittest/wordpress/wp-includes/pluggable.php on line 1216
       ```
   
 * Cheers,
    Vinny

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

The topic ‘API Docs’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability 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/)

 * 6 replies
 * 2 participants
 * Last reply from: [useStrict](https://wordpress.org/support/users/usestrict/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/api-docs-2/#post-10363113)
 * Status: not resolved