WordPress.org

Forums

Cimy Swift SMTP
[resolved] Cimy Swift SMTP not sending emails from WooCommerce (11 posts)

  1. Samuel Aguilera
    Member
    Posted 2 years ago #

    Hi!

    I just found that Cimy Swift SMTP is not working while using it in conjuction with WooCommerce.

    General WordPress emails are working, but emails generated from WooCommerce orders are not... And while searching why, I found messages like these on the Apache error log:

    PHP Warning: fopen(): Filename cannot be empty in /my-path/wp-content/plugins/cimy-swift-smtp/Swift/lib/classes/Swift/ByteStream/FileByteStream.php on line 125, referer: http://www.example.com/checkout-page

    After disabling Cimy Swift SMTP (and before activated it) all runs fine again.

    Any fix?

    http://wordpress.org/extend/plugins/cimy-swift-smtp/

  2. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    Hi, please try the development version that can be found here:
    http://downloads.wordpress.org/plugin/cimy-swift-smtp.zip

    The only thing I changed is to update Swift Mailer to v4.2.2.
    If doesn't work yet I ask you to tell me more which kind of email is trying to send WooCommerce:
    do they contain attachments? If yes which ones?

    Thanks.

  3. Samuel Aguilera
    Member
    Posted 2 years ago #

    Thank you Marco!

    I have downloaded it, I'll try ASAP and report back to you.

    In the mean time I can tell you that are only HTML emails (including linked images), no attachments.

  4. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, but maybe there is an image linked? Like a footer or an header?
    If yes can you try to disable it (if still failing)?

  5. Samuel Aguilera
    Member
    Posted 2 years ago #

    Yes. There's one image linked in the HTML body of the email, but no image attached. Only the URL for loading it from the site in the HTML body.

  6. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    Ok pls try the development version first.
    If still fails try to remove this image.

  7. Samuel Aguilera
    Member
    Posted 2 years ago #

    I'll try it some hours later. And I'll report back when tried ;)

  8. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    Ok I was able to reproduce the issue, I am afraid both my update and my workaround don't fix the issue :(
    So I filed a ticket against Swift Mailer, but I am not sure when this will be fixed.
    https://github.com/swiftmailer/swiftmailer/issues/274

  9. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, an ugly workaround that works is this one:
    edit the file: /my-path/wp-content/plugins/cimy-swift-smtp/Swift/lib/classes/Swift/ByteStream/FileByteStream.php
    at line: 135
    change the line from:

    if (!$this->_reader = fopen($this->_path, 'rb')) {

    to:

    if (empty($this->_path))
        return null;
    if (!$this->_reader = fopen($this->_path, 'rb')) {

    I know it is not the best, but for now we can live with it until they fix the bug in Swift Mailer.

  10. Samuel Aguilera
    Member
    Posted 2 years ago #

    Thank you so much Marco!! ;)

    I'll try the temporary fix while waiting for the Swift mailer to be fixed.

  11. Marco Cimmino
    Member
    Plugin Author

    Posted 2 years ago #

    Indeed, was a bug in Swift Mailer, in the meanwhile I added a workaround, a new version will come out on Monday.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Cimy Swift SMTP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic