Skip to navigation Skip to content
ASchroder.com

Notes on Web Development

  • Home
  • About
  • Presentations
  • Home
  • About
  • Presentations
Posted on August 29, 2009 February 28, 2010

SMTP Pro Magento extension, free and open SMTP support for Magento

Written by
Ashley
Posted in
Magento, Projects, SMTP Pro Magento Extension, Web Development
Tagged
athentication, cram-md5, login, Magento, plain, smtp, ssl, tls
Comments
220 Comments

Well this morning I said I was going to start working on a simple SMTP extension for Magento. The weather was completely stink here in Auckland so I ended up making the ASchroder.com SMTP Pro Magento extension this afternoon you can get it from Magento Connect. It’s a development release and I’m seeking feedback on it from people willing to give it a try.

It has several features over the older SMTP extensions available for Magento.

  1. supports self testing right from the Magento admin UI
  2. logs friendly messages if you enable logging in var/log
  3. has helpful comments to guide you when configuring
  4. supports Magento built in newsletters

Several people have asked me to open my Google Apps / Gmail Magento extension up to support other SMTP servers. I worried that once I added extra configuration options to my extension, the simplicity and ease of use would be lost. I decided to separate the two extensions so that those who just want to send using gmail or Google Apps, do not need to know anything about TLS, Authentication or what port to send on (it’s 587 if you care…). So that’s why I have made this Magento SMTP extension, I’ll be supporting it as best I can, just as I do with my Google Apps and Gmail extension.

Here is a screenshot of the configuration dialog:

This shows the Configuration options for the SMTP Pro extension.
This shows the Configuration options for the SMTP Pro extension.

And also a screenshot of a successful self test result:

This shows the results of a self test.
This shows the results of a self test.

If you have any comments, suggestions or feedback, please let me know.

You might also be interested in:

  1. Pre-release: SMTP Pro / Magento Gmail & Google Apps Email Beta testing (win a prize)
  2. Magento SMTP, Gmail and Google Apps Email combined extension released (at last)
  3. Google Apps Email/Gmail Magento Extension v0.5 released
  4. Magento SMTP Pro 2 – Free and Open Source SMTP Configuration
  5. Sneak Peek at the New Magento Gmail/Google Apps and SMTP extension

Post navigation
Google Apps Email/Gmail Magento Extension v0.5 released
Sneak Peek at the New Magento Gmail/Google Apps and SMTP extension

220 thoughts on “SMTP Pro Magento extension, free and open SMTP support for Magento”

Comment navigation
← Older Comments
Newer Comments →
  1. andi
    January 20, 2010

    Found it!! ๐Ÿ™‚

    The issue was being caused by a setting in… Admin > System > Configuration > Newsletter > Sending Options (Set Return-Path)

    We had this set to ‘YES’ throughout the testing and it seems that this was causing the issue.
    Setting this to ‘NO’ allowed the emails to be sent using the configured SMTP settings perfectly.

    Thank you for your time on this Ashley and for such a fantastic and ‘well coded’ extension at such a fantastic price 0.00 ๐Ÿ™‚
    A Must for all Magento installations!!

    Looking forward to following future works!

  2. Ashley
    January 20, 2010

    Thanks for the kind words – and for dropping by to tell others about the issue. You’re always welcome to send me a beer through paypal if you think $0 is underpriced ๐Ÿ™‚

  3. rdv
    February 2, 2010

    Ashley,

    Great work on this extension! I’m having a bit of an issue getting it to work, though. Here’s the output of the self test:

    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Connection to Host SMTP server successful.
    Sending test email to your contact form address me@mydomain.com:
    Unable to send test email. Exception message was: Warning: stream_set_timeout(): supplied argument is not a valid stream resource in /hsphere/local/home/account/mydomain.com/lib/Zend/Mail/Protocol/Abstract.php on line 237…
    Please check and double check your username and password.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

    Any thoughts?

  4. Ashley
    February 2, 2010

    well – it is just a warning…. maybe disable warnings for php?

    otherwise it looks like it might be unable to open the connection – maybe a firewall or issue with your hosting? Who are you with?

  5. Calvin
    February 9, 2010

    Hi im using your smtp pro with magento when i run selft test i get this Error.
    —
    Unable to send test email. Exception message was: 554 The message was rejected because it contains prohibited virus or spam content …
    —
    much like yang im a godaddy user it appears there spam filter is blocking this message. I also found this:
    http://michael.orlitzky.com/articles/godaddys_spam_filter_is_broken.php

    However, im still looking for a solution since there is no web address in the self run test. If yang found i a solution i believe the same thing would work for me thanks, Calvin

  6. Jon Lim
    February 17, 2010

    Hi there!

    I’m trying to use your extension but it doesn’t seem to be able to connect to the self test – is there an issue with GoDaddy’s mail servers?

    Would appreciate any help you can give. Thanks!

  7. Ashley
    February 17, 2010

    Hi, Jon – What’s the error you are getting?

  8. Mike Stecker
    February 18, 2010

    I keep getting errors each time I try. I’ve typed in everything I can’t even count how many times.

    Here is the error:
    Failed to connect to Host SMTP server. Reason: Failed to parse address “”(0)
    This extension requires an outbound SMTP connection on your specified port.
    Sending test email to your contact form address s********@****.com:
    Unable to send test email. Exception message was: ” does not match the expected structure for a DNS hostname, ” does not appear to be a valid local network name…
    Please check and double check your username and password.

  9. Ashley
    February 21, 2010

    Have you saved the settings before running the test? That error seems to be due to empty SMTP host.

  10. Brian
    February 22, 2010

    Hello,
    Any way to download & install this extension without the use of Magento Connect? MC is giving me fits right now and I’d really like to give this a try.

  11. Ashley
    February 24, 2010

    You are supposed to be able to download them directly, but I’ve never got it to work. Email me, I can send it to you.

  12. Darley
    February 27, 2010

    Hello Ashley,
    – the SMTP Pro Magento extension works with Magento 1.4.0.1?
    Kind Regards,

    Darley

  13. Ashley
    February 27, 2010

    I haven’t tried it yet – if you do, please let us all know?

  14. James
    March 2, 2010

    Hi Ashley,

    I keep getting errors on SMTP Pro extension.

    Here is the error:
    Testing outbound connectivity to Server:
    Failed to connect to Host SMTP server. Reason: Connection timed out(110)
    This extension requires an outbound SMTP connection on your specified port.
    …..

    I set the informations as following:
    Host: smtp.gmail.com
    Port: 587
    SSL Security: SSL TLS

    Would appreciate give me some help as you can!

    Best Regards,
    James

  15. Ashley
    March 2, 2010

    Is there a reason you’re not using my gmail/google apps extension for those settings? Might save you the hassle of setting it up – also if that still doesn’t work please paste the output of the self test and I’ll see if I can help.

  16. Snake
    March 8, 2010

    Hi,

    using magento 1.4
    installed your extension, but i just get a blank page on any pages that try to send email, includign the self test.

  17. Ashley
    March 8, 2010

    Please enable logging and send me the log output for several email actions (contact form, new account) and also for the self test. Also please include self test result output (if you get any).

  18. Adam
    March 14, 2010

    Thanks for writing this app. And thank you for being smart enough to include the self test. It is a great feature. I am having the toughest time to get my Magento install to send out any emails. I tested the php mail() function on my server and it works fine. But Magento emails never go out. I am using a remote mail server that is redirected through an A name. But all mail does work for the system.

    Using your plugin I am getting the following error code, any thoughts would be greatly appreciated.

    Failed to connect to Host SMTP server. Reason: Connection refused(111)
    This extension requires an outbound SMTP connection on your specified port.
    Sending test email to your contact form address online@americanfireglass.com:
    Unable to send test email. Exception message was: Connection refused…
    Please check and double check your username and password.

  19. Ashley
    March 14, 2010

    ‘Connection refused’ sounds like the remote SMTP server is rejecting your connection. On *nix a simple test is to run the command ‘telnet $your_smtp_host $your_smtp_port’ if that works, then this extension should also be able to work – my bet is it won’t work on that box. Let me know.

  20. Adam
    March 15, 2010

    Thanks for the reply. I was able to telnet into the system successfully. Very strange.

  21. Jill
    March 29, 2010

    I’m having problems with the self test no matter what server I use, gmail or godaddy.

    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Connection to Host SMTP server successful.
    Sending test email to your contact form address aliasbdi+businesses2learn@gmail.com:
    Unable to send test email. Exception message was: smtp.gmail.com has timed out…
    Please check and double check your username and password.

    We use this same userid for our main service (not magento) and it’s fine using port 465.

    Any ideas?

    Also, why would it create the email address like this .. aliasbdi+businesses2learn@gmail.com when it is actually jlastname@domain.com for the admin user I’m logged in as.

    Thank you for your help. I ultimately need to use godaddy smtp server but I’m not sure what port it needs to be and if it uses SSL or SSL TSL at all.

    Any help is greatly appreciated.

  22. Stain
    March 30, 2010

    Hi Ashley

    Cool app :), but I have a small (well not that small) problem.
    I’m using magento 1.4.0.1 and after installation of your app my order emails are not being sent.. Self test completes successfully , and customers receive newsletter subscription confirm mails but mail with order details is not sent.Any ideas why is this happening ?

  23. Ashley
    March 30, 2010

    Can you confirm what other extensions you have installed? Perhaps try my extension on a fresh install of Magento to confirm the problem is extension related?

  24. Ashley
    March 30, 2010

    @jill 2 things: 1, are you allow +’s in your Gmail addresses? and 2, weird that it’s reporting a timeout error, anything strange on the box with regard to firewall config?

  25. Stain
    March 31, 2010

    I found out what was wrong ๐Ÿ™‚
    We had System->Config->Sales Emails->Orders->’Send Order Email Copy Method’ set to Bcc and when i changed this to Separate Email everything worked (we have two mails for bcc)…should i change the rest of our Sales Emails settings to Separate Emails, or the ext can support Bcc when there is only one address ?

  26. Ashley
    March 31, 2010

    Thanks for the info – I’ll test this, may be a bug or something has changed in the newer versions.

  27. roger
    April 8, 2010

    dear ashley

    thanks for your good extension.

    i installed it on my laptop and i found it works when i set the config of “use the store adress for reply to” to yes and the store email address is different from the email setting in the extension config, then i can’t get the email any more.

    is it possible to get the user’s email address as the reply to on any outgoing email. since i think it is better when user share product from wishlist and send email to his friends.

    thanks and rgds.
    roger

  28. Ashley
    April 10, 2010

    roger, can you flick me an email or reply here with a bit more information about what you’re describing – it’s not entirely clear to me but it sounds like two things:

    1) the reply-to setting breaks your emails entirely
    and 2) the emails sent ‘from’ the customer like the tell a friend one for example, should come from the customer or at least be reply-to the customer.

    If I have understood you and that’s not currently the case then it may be an issue, and I will fix it. Let me know.

  29. Hidayet Ok
    May 11, 2010

    Hi Ashley,

    First of all thanks for this great extension…

    I’ve installed and tested. Test mails working but normal mails not working.

    What can I do ?

  30. Ashley
    May 11, 2010

    Hi, Thanks- Could be extensions clashing, or something else…. Enable logging and paste log output from several email operations (new account, contact form etc), also let me know what extensions you have installed.

  31. tonyio
    May 21, 2010

    salve,
    idem Ashley
    Iโ€™ve installed and tested. Test mails working but normal mails not working.

    What can I do ?
    thanks

  32. Ashley
    May 23, 2010

    Hi, please enable logging and paste what log output you get from sending test emails, contact form submit and new account creation.

  33. Roland
    June 1, 2010

    Hi Ashley,

    suddenly I receive an error-notice installing SMTP Pro via Magento Connect Manager:

    Failed to download magento-community/ASchroder_SMTPPro within preferred state “stable”, latest release is version 1.1.2, stability “beta”, use “channel://connect.magentocommerce.com/community/ASchroder_SMTPPro-1.1.2” to install
    Cannot initialize ‘channel://connect.magentocommerce.com/community/ASchroder_SMTPPro’, invalid or missing package file
    Install Errors
    Package “channel://connect.magentocommerce.com/community/ASchroder_SMTPPro” is not valid
    PEAR ERROR: install failed

    Iยดm running Magento in Windows XP SP3 with XAMPP 1.7.2.

    What am I doing wrong? Thanks for your help!

  34. Ashley
    June 1, 2010

    You need to set your stability to beta before installing (do this on the Magento Connect screen) – I have not set my extension to stable as it is still having features added. Interesting that Magento Connect is referring to ASchroder_SMTPPro-1.1.2 – it keeps reporting an error when I try to upload that…

  35. Ashley
    June 1, 2010

    This is interesting: http://www.magentocommerce.com/extension/specs/1865/aschroder.com-smtp-pro#specs. Roland, can you please let me know how you get on installing it? If the version is as expected then I can finally revert to Magento Connect as the preferred installation.

  36. Mathew
    June 8, 2010

    Hi Ashley!
    Thanks for this help with magento!

    I’m from brazil and my friends here are getting this error:

    PHP Fatal error: Class ‘Aschroder_SMTPPro_IndexController’ not found in E:\home\oculosstor\Web\app\code\community\Aschroder\SMTPPro\Model\Observer.php on line 30

    Can you help me?
    Thx!

  37. Ashley
    June 8, 2010

    @Matthew and @Marc – Sorry that looks like a bug. I think controllers actually need to be explicitly included. Stand by for a fix.

  38. Ashley
    June 8, 2010

    Ok, the trick was that when executing the self test, the controller is included, and any other time it’s not. But we can’t re-include it, so use include_once like this by modifying the Observer.php on line 27:

    // For the self test, if we’re sending the contact form notify the self test class
    if($event->getTemplate() == “contacts_email_email_template”) {
    include_once “app/code/community/Aschroder/SMTPPro/controllers/IndexController.php”;
    Aschroder_SMTPPro_IndexController::$CONTACTFORM_SENT = true;
    }

    Update: Download the latest SMTPPro Magento email extension release (1.3.1) here.

  39. David
    June 11, 2010

    Ashley,
    Thanks for the great app. During development emails were working fine so comfortable with general installation and operation. Have updated to 1.3 and now gone live with site. However, various required changes in going live have mucked up the email. No reason to believe that 1.3 is to blame. Self-test sends the test email fine however contact form will not.

    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 info@lindagorringecouture.com.au:
    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.

    Self-test looks to call …../index.php…. contacts(?) when contact form url is in fact site.com.au/contacts (ie. no index.php). Result is that self-test “hangs” on trying to access the contact form. I have to stop and go back to Admin.
    I suspect this is a result of .htaccess rewrites. Any suggestions on how to best avoid or circumvent this redirection (if indeed you think that’s what is happening).

    Your assistance greatly appreciated.

    Cheers from Aus, David

  40. Ashley
    June 11, 2010

    Hi, David – Thanks for the kind words. I take it you’re running the latest version (judging by that self test output)? My extension simulates the contact form email sending from the server side, and then checks that during that sending my extension is invoked to do the sending. If it is not, it’s very likely that some other extension has overridden some of the core functionality I use to send emails. I’d suggest disabling some 3rd party extensions (in app/etc/modules) to see if that helps. The extension shouldn’t actually invoke the URL /contacts though. and index.php/contacts is the same as /contacts when you have rewrites on – the rewrite is just to put index.php at the start of everything server side. Let us know how you get on.

  41. Tom
    June 28, 2010

    Hello Ashley,
    Thanks for taking the time to create this extension! Once I figure out how to get it working properly I know it will be very useful. However, I am currently having two problems.

    1. I am getting this message during self test:
    Failed to connect to Gmail SMTP. Reason: Connection refused(111)
    This extension requires an outbound SMTP connection on port 587. You need to check if your hosting server blocks outbound TCP connections or SMTP connections on port 587, and if so request access. If you are sure your host supports outbound SMTP on port 587 then something else is preventing a test connection. Please visit ASchroder.com for more information.
    Sending test email to your contact form address support@diesel-moto.com:
    Unable to send test email. Exception message was: Connection refused…
    Please check and double check your email and password. If in any doubt you can login to the web interface for your email address to confirm at either ‘mail.google.com/a/your_domain’ or ‘gmail.com’.

    2. Contact form fails to send when the Google Apps Email is enabled.

    Any help you can provide would be greatly appreciated. Thanks again!

  42. Ashley
    June 28, 2010

    @Tom, Did you check with your host about the outbound connectivity mentioned in the error message – if so what did they say?

  43. paul
    July 13, 2010

    hi Ashley, im trying to install your extension but errors come out?

    Failed to download magento-community/ASchroder_SMTPPro within preferred state “stable”, latest release is version 1.1.2, stability “beta”, use “channel://connect.magentocommerce.com/community/ASchroder_SMTPPro-1.1.2” to install
    Cannot initialize ‘channel://connect.magentocommerce.com/community/ASchroder_SMTPPro’, invalid or missing package file
    Install Errors
    Package “channel://connect.magentocommerce.com/community/ASchroder_SMTPPro” is not valid
    PEAR ERROR: install failed

  44. Ashley
    July 14, 2010

    Hi, Paul – you need to set you preferred stability to beta, then try to download again.

    BTW – the Magento Connect version is old now – I just haven’t been able to update Magento Connect for months. You can get the latest version here.

  45. paul
    July 14, 2010

    hi Ashely, thanks for your reply! i try to download Updated to 1.3.1, then when i unzip the file there only 1 file inside the zip file, there are no package.xml file.

    thanks a lot!

  46. Ashley
    July 14, 2010

    Hi, strange – please try again, possible with a different web browser I just did this:
    wget http://aschroder.com/wp-content/uploads/2010/06/Aschroder_SMTPPro-1.3.1.tgz

    and:

    tar tzvf Aschroder_SMTPPro-1.3.1.tgz | awk '{print $9}'

    And got expected results:

    package.xml
    Aschroder_SMTPPro-1.3.1/adminhtml/default/default/template/smtppro/view.phtml
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Block/Adminhtml/Test.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Block/Log/Grid.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Block/Log/View.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Block/Log.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/controllers/IndexController.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/controllers/LogController.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/etc/config.xml
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/etc/system.xml
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Helper/Data.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/Email/Log.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/Email/Template.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/Mysql4/Email/Log/Collection.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/Mysql4/Email/Log.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/Mysql4/Setup.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/Newsletter/Template.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/System/Config/Source/Smtp/Authentication.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/System/Config/Source/Smtp/Development.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/System/Config/Source/Smtp/Option.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/System/Config/Source/Smtp/Ssl.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/Email.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/Model/Observer.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/modules/Aschroder_SMTPPro.xml
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/sql/smtppro_setup/mysql4-install-1.1.0.php
    Aschroder_SMTPPro-1.3.1/Aschroder/SMTPPro/templates/adminhtml/base/default/template/smtppro/view.phtml
    Aschroder_SMTPPro-1.3.1/modules/Aschroder_SMTPPro.xml

    Which looks right to me.

  47. paul
    July 14, 2010

    Many thanks Ashely, i try it in firefox browser and i download the complete file… im not sure what problem in my ie?.. try to install and check your extension, thanks for this great stuff!

    cheers! and more power…

  48. Ashley
    July 15, 2010

    Did you remember to disable your IE open-source software blocker? ๐Ÿ™‚

  49. paul
    July 15, 2010

    hi, really your extension is great! my smtp email is now working fine, actually i didn’t disable my IE open-source software blocker, peace…. i have 1 more problem, when im trying to use contact page in magento “Unable to submit your request. Please, try again later” this is the error i get? kindly please advise what can i do to fix this one?

    many thanks!

  50. Patrick Pittman
    July 15, 2010

    Hey Ashley,

    Running 1.3.1 of extension on 1.4.1.0 – it doesn’t seem to be heeding settings properly. I have it set to SMTP and both server and port (and auth options) are properly filled in under the SMTP Pro Email SMTP Settings. Send Test Email returns:

    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Using SMTP configuration options
    Failed to connect to SMTP server. Reason: Failed to parse address “”(0)
    This extension requires an outbound SMTP connection on port:
    Sending test email to your contact form address x@y.com:
    Unable to send test email. Exception message was: 334 UGFzc3dvcmQ6 …
    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.

    and the log shows:

    2010-07-15T23:28:13+00:00 DEBUG (7): Running SMTP Pro Self Test
    2010-07-15T23:28:13+00:00 DEBUG (7): Development mode:
    2010-07-15T23:28:13+00:00 DEBUG (7): Raw connection test….
    2010-07-15T23:28:13+00:00 ERR (3): Warning: fsockopen() [function.fsockopen]: unable to connect to :0 (Failed to parse address "") in /var/www/x.y.com/app/code/community/Aschroder/SMTPPro/controllers/IndexController.php on line 51
    2010-07-15T23:28:13+00:00 DEBUG (7): Complete
    2010-07-15T23:28:13+00:00 DEBUG (7): Actual email sending test….
    2010-07-15T23:28:13+00:00 DEBUG (7): Preparing the Google Apps/Gmail Email transport, email to send with is:
    2010-07-15T23:28:13+00:00 DEBUG (7): Returning transport
    2010-07-15T23:28:16+00:00 DEBUG (7): Test email was not sent successfully: 334 UGFzc3dvcmQ6

    2010-07-15T23:28:16+00:00 DEBUG (7): SMTPPro is enabled, sending email in Aschroder_SMTPPro_Model_Email_Template
    2010-07-15T23:28:16+00:00 DEBUG (7): Complete

    this looks like it might be using the google transport, even though set to SMTP? either way, it doesn’t appear to be picking up the correctly set and saved server settings… any ideas?

Comment navigation
← Older Comments
Newer Comments →

Comments are closed.

© ASchroder.com 2023
Storefront designed by WooCommerce.