Posted on

Magento 1.5.0.1 and SMTPPro 1.4.2 Now Working – Free Gmail/SMTP, ahoy!

There have been several reports of my SMTP Pro email extension failing on Magento 1.5. I hadn’t tested or recommended installing it on Magento 1.5 and wasn’t going to for a little while. You could say I’m not really an early adopter when it comes to Magento versions.

However, the ever helpful Rhonda (@rondata) from Magento got in touch with me late last week to report there may have been a packaging problem with my extension that has made it unable to be used on the new Magento Connect. So I thought if I was going to repackage it, I may as well also fix it up for Magento 1.5 – and so here is SMTPPro version 1.4.2.

As always you can download the package manually here (or via Magento Connect) to check it out before you install it manually.

I have tested the extension on Magento 1.4.2 and 1.5.0.1, also tested a Magento Connect install on 1.5.0.1. Everything seems to be in order. The change in 1.5 was a move to array based email addresses and names in the Email_Template class.

I still feel like it’s shoddy OO that I have to override an entire method and duplicate all the logic in it just to swap in my SMTP transport configuration. For those that care, I did try some techniques to avoid it, but the default transport is explicitly set by the core code if a return path is set, which invalidates anything I can do in a subclass – short of temporarily hijacking the return path configuration, which I may resort to doing in the next release.

In the process of testing a Magnto Connect install I did see a very cool feature in the latest Magento, and I may just have missed it in the earlier releases as I seldom use Magento Connect anymore.

Upload a  Package directly

Installing a package directly from within the downloader module will surely make the day of many commercial extension developers – at least until they can sell extensions directly on Magento Connect*.

Anyway, that’s about it – the new version supports 1.5, and can be downloaded/installed on Magento Connect. Go enjoy some free SMTP/Google Apps/Gmail email sending! Please let me know if you have any problems or spot any bugs.

* Speaking of which, I wonder what % Magento will take… Apple set a pretty high benchmark at 30%. Magento doesn’t quite have the same kung-fu grip on distribution though so maybe it’ll be lower.

18 thoughts on “Magento 1.5.0.1 and SMTPPro 1.4.2 Now Working – Free Gmail/SMTP, ahoy!

  1. Ashley,

    Having a bit of trouble. Don’t know what this error means.
    PHP Fatal error: Class ‘Mage_Core_Model_Email_Template’ not found in /*****/httpdocs/app/code/community/Aschroder/SMTPPro/Model/Email/Template.php

    Any ideas?

  2. For some reason smtp pro is no longer working for me using SSL. It says it successfully connects to the SMTP server but then gives:

    “Unable to send test email. Exception message was: 535 Incorrect authentication data …
    Please check and double check your username and password.
    Contact Form test email did not use SMTPPro to send.
    Testing failed”

    The user/pass fields have not changed. Another weird thing is that we are getting CC’d e-mails to our gmail spam box and gmail it saying “warning account may be spoofed” and I have no idea how e-mails are even getting there.

  3. @Matt think we twittered briefly earlier today, I’m not sure why that class wouldn’t be visible on 1.4.2, can you confirm if it is there in your installation? (using grep for example?)

    @Dustin – I think there are two issues. 1) the connectivity problem. I’m not sure if that’s a possible regression or not, I’d need more info, could you send me the debug output from system.log during self-test and also during normal email activities such as forgot password, contact form and new account?

    2) The weird CC’ing issue. You know I had that happening to one of my accounts a couple of days ago and I do not know what was happening, it’s stopped now. I wonder if it might have been a gmail issue, not a SMTP Pro issue, as I couldn’t see any reason why it would have happened, no settings/code had changed. Anyway if it’s still happening to you in a couple of days please let me know as I’d like to find a replicable test case.

  4. Ashley, could you let me know where to get the system log info? Just so you know I wasn’t using the gmail portion of this extension, I was actually having it send directly through our dedicated server. Then I had gmail retrieving e-mails from that account.

    Just so you know it is sending all of the CC’s to the spam box claiming my account is being spoofed, but I have no idea why there is even anything being sent there, it is confusing. It says successfully connected and the test e-mails send fine but it seems that e-mails still aren’t making it because we are having a lot of people tell us that aren’t getting them.

  5. Hi Ashley,

    Thanks a bunch for you component!! It’s a real time saver!
    I just found what I believe to be a bug though. I’m trying to authenticate (auth login) with an email that contains the ‘-‘ character (e-commerce@…)
    Since the integrity check was failing I enabled Magento’s logs and realized that the dash was getting removed:

    exception ‘Zend_Mail_Protocol_Exception’ with message ‘5.1.1 <ecommerce@(removed)> User unknown; rejecting

    As you can see, no dash here.

    What should I do?

    Thanks in advance!

  6. Hi Ashley,

    We installed SMTP Pro anddeleted some extensions what could cause the problem that the contactform is not sending. After deleting those other extensions we get this error. Any idea?

    Fatal error: Call to a member function setDesignConfig() on a non-object in /var/www/html/magento/app/code/community/Aschroder/SMTPPro/controllers/IndexController.php on line 169

  7. Hi Asyley,

    I have some problem with smtp pro. i have insert all the info require and when i press on run self test.
    it show

    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Using Google Apps/Gmail configuration options
    Connection to Host SMTP server successful.
    Sending test email to your contact form address contact@flingson.com:
    Unable to send test email. Exception message was: Unable to connect via TLS…
    Please check and double check your username and password.
    Contact Form test email did not use SMTPPro to send.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

    i have double check the pass and user and is not wrong.
    i have also asked my server admin to enable TLS on my server. but it seems that is still not working. any idea?

    im using magento 1.5.0.1 and smtppro 1.4.3

  8. @Leo – could you actually just use an address with no ‘-‘ in it? I’ll look in to this issue for the next release, but it might be Zend framework related.

    @Nicholas Check with your webhost, they might be blocking the connection?

    @Gert-Jan – could it be template related?

  9. Hell Ashley!
    I have to problems and i donĀ“t no what is the problem ? can you help? here is the log:
    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Using SMTP configuration options
    Connection to Host SMTP server successful.
    Sending test email to your contact form address website@rgl.pt:
    Unable to send test email. Exception message was: Requested action not taken: mailbox unavailable …
    Please check and double check your username and password.
    Contact Form test email did not use SMTPPro to send.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

    Can you help me urgent?

  10. Hi, I’m testing out your amazing extension. But for some reason my settings don’t get saved. Tried it several times. Cleared the cache. Nothing worked. Could you please help me out with this.
    On a sidenote: I’m on 1.10.0.2 EE.
    I’m not hoping this error is caused because I’m working with the Enterprise edition.

    Thank you in advance!

  11. Hi Ashley,

    I’ve installed your module, but I don’t think my system is using it to send emails. Here is the result of the self test:

    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Using Google Apps/Gmail configuration options
    Connection to Host SMTP server successful.
    Sending test email to your contact form address Contact@security-camera-warehouse.com:
    Test email was sent successfully.
    Contact Form test email did not use SMTPPro to send.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

    I have the stock mail sending settings turned off (tried it with them on too), but no dice.

    Thanks for the great free module!

  12. Hi, Justin – that might point to an extension clash. There are extensions you can install that will look for clashes, might pay to install one of them and check.

  13. Hi Ashley,

    Thanks for the great extension.

    I recently installed Magento 1.5.1.0 on my Windows 7 machine. Then I added your extension, but its unable to send an email. The error message from the self diagonising test is:
    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Using Google Apps/Gmail configuration options
    Connection to Host SMTP server successful.
    Sending test email to your contact form address
    :
    Unable to send test email. Exception message was: Unable to connect via TLS…
    Please check and double check your username and password.
    Contact Form test email did not use SMTPPro to send.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

    System logs are:
    2011-06-22T16:58:18+00:00 DEBUG (7): Running SMTP Pro Self Test
    2011-06-22T16:58:18+00:00 DEBUG (7): Development mode: disabled
    2011-06-22T16:58:18+00:00 DEBUG (7): Raw connection test….
    2011-06-22T16:58:19+00:00 DEBUG (7): Complete
    2011-06-22T16:58:19+00:00 DEBUG (7): Actual email sending test….
    2011-06-22T16:58:19+00:00 DEBUG (7): Preparing the Google Apps/Gmail Email transport, email to send with is:
    2011-06-22T16:58:19+00:00 DEBUG (7): Returning transport
    2011-06-22T16:58:21+00:00 ERR (3): Warning: stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto in C:\xampp\htdocs\eyewear\lib\Zend\Mail\Protocol\Smtp.php on line 206
    2011-06-22T16:58:21+00:00 DEBUG (7): Test email was not sent successfully: Unable to connect via TLS
    2011-06-22T16:58:21+00:00 DEBUG (7): Actual contact form submit test…
    2011-06-22T16:58:21+00:00 DEBUG (7): SMTPPro is enabled, sending email in Aschroder_SMTPPro_Model_Email_Template
    2011-06-22T16:58:21+00:00 DEBUG (7): Preparing the Google Apps/Gmail Email transport, email to send with is:
    2011-06-22T16:58:21+00:00 DEBUG (7): Returning transport
    2011-06-22T16:58:21+00:00 DEBUG (7): About to send email
    2011-06-22T16:58:23+00:00 ERR (3): Warning: stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto in C:\xampp\htdocs\eyewear\lib\Zend\Mail\Protocol\Smtp.php on line 206
    2011-06-22T16:58:23+00:00 DEBUG (7): Complete

    Exception logs are:
    2011-06-22T16:58:23+00:00 ERR (3):
    exception ‘Zend_Mail_Protocol_Exception’ with message ‘Unable to connect via TLS’ in C:\xampp\htdocs\eyewear\lib\Zend\Mail\Protocol\Smtp.php:211
    Stack trace:
    #0 C:\xampp\htdocs\eyewear\lib\Zend\Mail\Transport\Smtp.php(200): Zend_Mail_Protocol_Smtp->helo(‘localhost’)
    #1 C:\xampp\htdocs\eyewear\lib\Zend\Mail\Transport\Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
    #2 C:\xampp\htdocs\eyewear\lib\Zend\Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
    #3 C:\xampp\htdocs\eyewear\app\code\community\Aschroder\SMTPPro\Model\Email\Template.php(107): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
    #4 C:\xampp\htdocs\eyewear\app\code\core\Mage\Core\Model\Email\Template.php(437): Aschroder_SMTPPro_Model_Email_Template->send(”, NULL, Array)
    #5 C:\xampp\htdocs\eyewear\app\code\community\Aschroder\SMTPPro\controllers\IndexController.php(177): Mage_Core_Model_Email_Template->sendTransactional(‘contacts_email_…’, ‘support’, ”, NULL, Array)
    #6 C:\xampp\htdocs\eyewear\app\code\community\Aschroder\SMTPPro\controllers\IndexController.php(134): Aschroder_SMTPPro_IndexController->_sendTestContactFormEmail()
    #7 C:\xampp\htdocs\eyewear\app\code\core\Mage\Core\Controller\Varien\Action.php(420): Aschroder_SMTPPro_IndexController->indexAction()
    #8 C:\xampp\htdocs\eyewear\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch(‘index’)
    #9 C:\xampp\htdocs\eyewear\app\code\core\Mage\Core\Controller\Varien\Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
    #10 C:\xampp\htdocs\eyewear\app\code\core\Mage\Core\Model\App.php(340): Mage_Core_Controller_Varien_Front->dispatch()
    #11 C:\xampp\htdocs\eyewear\app\Mage.php(627): Mage_Core_Model_App->run(Array)
    #12 C:\xampp\htdocs\eyewear\index.php(80): Mage::run(”, ‘store’)
    #13 {main}

    I have replaced the mail ids that I am using with generic names. I have double checked the email ids and passwords that I am using. Can you please help me in resolving this issue.

    Thanks,
    Varun

  14. The extension has been working for years trouble free. All of a sudden it stopped working. A self test in the back end gives;

    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Using SMTP configuration options
    Connection to Host SMTP server successful.
    Sending test email to your contact form address support@meanmachines.biz:
    Unable to send test email. Exception message was: Incorrect authentication data …
    Please check and double check your username and password.
    Contact Form test email did not use SMTPPro to send.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

    The username and password has NOT changed and works elsewhere. I have tried reinstalling but the problem persists.

    Using with Google APPS (but configured manually in the back end to use SMTP). Please help!

  15. I forgot to add – I am using Magento 1.6.1

  16. Hi Alex, I’m having nearly the same issue. Email has been working for 2 years with no problem, and suddenly stopped, although I’m on Magento 1.4.0.1 with smtpPro 1.1.1. I have not changed passwords, etc. Getting the “Exception message was: 535 Incorrect authentication data …” message.

    Did you find a solution?

  17. Alex / Joe, I have the exact same issue. No config changes made and it just stopped working around 10th November.

    Ashley, do you have a solution to this mate?

  18. Hi,

    Does it work on Magento 1.7.0.2?

Comments are closed.