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
Newer Comments →
  1. Joerg
    August 30, 2009

    Hi,

    where can i find the extension?

    Best regards

  2. Ashley
    August 30, 2009

    Hi,

    The SMTP extension is taking longer than usual to pass through the ‘pending’ state over at Magento Connect. If it hasn’t been published in the next 12 hours, I’ll hoist a pre-release version up on my blog so you can try it out. Cheers, Ashley

  3. Ashley
    August 31, 2009

    It’s published:
    http://www.magentocommerce.com/extension/1865

  4. Kristof, Fooman
    August 31, 2009

    Hey Ashley good stuff.

    I have a small feature request for you. It would be really great if you could implement something to temporarily change the to: field of ANY outgoing communication from your store to a debugging address or just turn off all emails. This would be very handy when you are testing with a copy of your store with live customer data or when you are importing orders.

    Cheers
    Kristof

  5. Ashley
    September 1, 2009

    Hey Kristof, welcome back!

    That’s a great suggestion, I’ll add it to 0.6 for sure. How about, something like a dropdown with:
    ‘Suppress ALL emails’, ‘Debug emails to contact form email address’ and ‘Send emails normally’ (the default).

    Work for you?

  6. Kristof, Fooman
    September 1, 2009

    Sounds awesome.

  7. Ashley
    September 1, 2009

    Doh, just realized I mixed up version numbers, I meant to say, it’ll be in v0.2 (the next version of SMTP Pro) – though it might be nice functionality for the Magento Google Apps / Gmail extension too…

  8. bluecos
    September 3, 2009

    STATUS is alpha can i use it for production shop site?

    does this solve the spam problem a bid 🙂 ?

    thanks bluecos

  9. Ashley
    September 3, 2009

    Hi, Bluecos

    You _can_ use it for a production store, in so much as there is no technical reason you can’t. Would I recommend it? No not really. Try it out in a staging environment first, if it does what you want it to then roll it out to production when you are ready. The code is largely based on the code in my Google Apps extension, which has nearly 1k downloads and no reports of critical problems. But it’s still very much in development, it’s the first version after all!

    What’s the spam problem a bid?

  10. Joerg
    September 6, 2009

    Hi,

    i want to try the extension in a german shop, but after the installation i can’t find anything in the admin menu. Does i need a translated Extension? Can i translate it? Where to find the files for a translation?

  11. Ashley
    September 6, 2009

    Hi, I don’t think the lack of a German translation would cause the extension not to work at all. More likely you would need to logout of Magento and back in again, or refresh your cache in the cache management section. If you’re offering to translate it to German that would be excellent! I’ll include placeholder translations in the next release, and then let you know, if you’re still keen to help I’d really appreciate more languages supported 🙂

  12. Joerg
    September 6, 2009

    Hi,

    surely i can/will help you with your translation!

    About my problem: I’ve tried allready to logout and clear the cache but i didn’t find the extension. Is there a step by step manual “how to install the extension”? (i have only download the extension with the “key” and then try to find the options in the admin/system menu – i found nothing)

  13. Ashley
    September 6, 2009

    What version of Magento are you on? You could double check the extension is installed by looking with FTP or SSH to make sure $magento_base/app/code/community/Aschroder/SMTPPro exists?

  14. Joerg
    September 7, 2009

    I use 1.3.2.3 … i reinstalled the module and the ooutput was

    —
    downloading Aschroder_SMTPPro-0.1.tgz …
    Starting to download Aschroder_SMTPPro-0.1.tgz (7,226 bytes)
    . . …done: 7,226 bytes
    install ok: channel://connect.magentocommerce.com/community/Aschroder_SMTPPro-0.1
    —

    but the Directory /code/community/ has only the entry for Mage

  15. Joerg
    September 7, 2009

    oh … my fault. wrong directions in the pear.ini

  16. Ashley
    September 7, 2009

    Hi, Glad to hear it’s all sorted. I’ll get in touch with you re: translations once I have the placeholder ones in the next release.

  17. Joerg
    September 7, 2009

    Okay, send me the files and i will translate them. Btw. It seems that your addon don’t work with all shared hoster (eg. Goneo in Germany). Now i use your googlemail addon and it runs very nice! If you would, i can translate it too

  18. Ashley
    September 7, 2009

    Hi, great I will do that, thanks for the offer. Can you give me more details on what was not working with the SMTP extension. Were you using the SMTP to connect to Gogle, or to a shared hosting SMTP? Could you send me any of the failed connection output from the self test or anything? Would be much appreciated. Cheers, Ashley

  19. Labris
    September 15, 2009

    Great plugin, but I encountered a same problem with your plugin as other SMTP extensions. It is that just invoice and shipping email will be sent, but order confirmation email will not be sent (all settings are on). Is there some coding differences between the order confirmation email part and others?

  20. Labris
    September 16, 2009

    The uninstall function does not work well. And it might have some conflict with other smtp plugin…..

  21. Labris
    September 16, 2009

    Another thing is that it does not work well with multiple virtual hosts.

  22. Ashley
    September 16, 2009

    Hi,

    Yes naturally if you install two SMTP plugins there will be conflict, please just choose one.

    Uninstall should work as with any Magento extension though, can you describe what is not uninstalling? Are the files in app/code/community/ASchroder still? Please give me more info and I can help you out.

  23. Ashley
    September 16, 2009

    Hi, Do you mean ‘virtual hosts’ in the Apache directive sense? Can you explain how these affect Magento or my extension specifically, I use it personally on at least 3 vhosted stores without problem. if there is a bug I’d really like to fix it up!

  24. Jon
    September 17, 2009

    Hi,
    Im getting a 334 error, on the gmail app test. Whats a 334 error?

    cheers

    JOn

    ASchroder.com Google Apps and Gmail Self-test results
    Testing outbound connectivity to Google:
    Connection to Google SMTP server successful.
    Sending test email to your contact form address jon@jeanography.com:
    Unable to send test email. Exception message was: 334 UGFzc3dvcmQ6 …
    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’.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

  25. Ashley
    September 17, 2009

    Hi, the 334 error seems to be the one where you need to log in to the web interface to solve a captcha. Give that a try.

    Cheers,
    Ashley

  26. Fredrik Sandgren
    September 24, 2009

    Hi,
    GREAT App!
    Really cool that you contribute like this!

    I got a problem as it seems anyway.
    It seems to work for the testmail… (it did not set the sendersadress though)
    But i cant get magneto to send email through your app…
    Is there some setting i should change?

  27. Ashley
    September 24, 2009

    Hi, flick me an email ashley.schroder at gmail, I’ll get a few extra details from you and see if I can figure it out.

  28. Fredrik Sandgren
    September 26, 2009

    Hi Ashley and others,

    My misstake… i found a bug in a php file that was not related to your code!
    So now it all works like a charm.
    GJ Ashley!

  29. Ray
    October 14, 2009

    Any idea what these errors mean?

    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 shop@markandersonprints.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.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

  30. Ashley
    October 14, 2009

    Have you saved before running the test? Looks like an empty SMTP hostname to me?

  31. Ray
    October 14, 2009

    Ashley,

    Yes that did it. I also had to be sure to include 25 as the port number and not leave it blank.

    Thanks!

  32. Rodolfo
    October 27, 2009

    I get an annoying 404, Page not found when I try to run the self test. The URL it tries to go is https://safe.itr.cn/index.php/admin/smtppro/index/index/ .. any idea of what the probelm is?

  33. Ashley
    October 27, 2009

    Hi,
    Can you let me know your Magento version? Also have you logged out and back in since installing? Does the URL actually have more to it, after what you posted? Most recent versions of Magento will have a URL key too.
    Cheers,
    Ashley

  34. yang
    October 27, 2009

    Hi Ashley,

    Thank you so much for providing this cool tool for Magento. I’m currently working on a project on goDaddy. Manage to get smtp moving a bit, but stuck at this error message.

    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 dreamaker.yang@gmail.com:
    Unable to send test email. Exception message was: 502 unimplemented (#5.5.1) …

    Not very sure about the error message. can help me out?

    Thanks a million.

  35. yang
    October 27, 2009

    Hi, sorry i have resolved the previous post issue. but end up with a new problem as below:

    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 dreamaker.yang@gmail.com:
    Unable to send test email. Exception message was: 554 The message was rejected because it contains prohibited virus or spam content …

    sigh. can help me on this?

  36. Ashley
    October 28, 2009

    I’m not 100% sure to be honest, but I think it’s server related. Try and contact Go Daddy, explain that you’re trying to connect to Gmail’s SMTP server with your PHP application, I’m sure they’ll be able to help. Either way, please report back and let us know for future.

  37. Ashley
    October 28, 2009

    What was the resolution? The suspense is killing me! Also your new error looks pretty self explanatory, I’m just not sure if it’s coming from Gmail or Godaddy. I think Go Daddy issue though, maybe check if they do some filtering on SMTP?

  38. yang
    October 28, 2009

    Hi Ashley,

    The first issue was solved after a through search on the net for the exception message 502 unimplemented (#5.5.1). Turn out goDaddy doesn’t need to apply the username and password for the smtp server which i’m trying to connect. however i’m still stuck at the second issue. contacting goDaddy and waiting for their reply. will keep you updated too. Thanks!

  39. yang
    October 29, 2009

    Hi Ashley,

    sorry have to trouble you again. what will be the Self test send out? goDaddy is asking what kind of message will be sending out through the smtp so they can better understand why the spam filter is blocking the self test mail. thank you very much!

  40. Ashley
    October 29, 2009

    Hi, it’s very simple plain text. It looks like this:
    An Example of the SMTP Pro/Google Apps/Gmail self test email sent by the ASchroder.com Magento Email extensions

  41. yang
    October 29, 2009

    Hi Ashley,

    sorry we might have a small misunderstanding. 🙂 i’m testing the SMTP Pro Magento extension currently, not the Gmail extension. sorry may i trouble you to show me the testing message for SMTP pro magento extension? thanks!

  42. Ashley
    October 29, 2009

    I’m quite lazy so it’s an identical message with ‘s/Google Apps/SMTP Pro/g’ basically 🙂 Certainly no advertising for medicine that would trip a spam detector!

  43. Indre
    December 3, 2009

    Hello,

    I have a very big problem, that emails are not going out from my e-shop (at the moment it is working as a catalog due to that reason:(((
    I don’t know what to do, read all forums… tried everything.. today I risked to install you extension, tried to do the test and the result was the following:
    ASchroder.com SMTP Pro Self-test results
    Testing outbound connectivity to Server:
    Failed to connect to Host SMTP server. Reason: ()
    This extension requires an outbound SMTP connection on your specified port.
    Sending test email to your contact form address info@pledai.lt:
    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.
    Testing failed, please review the reported problems and if you need further help visit ASchroder.com to contact me.

    Could you please explain me what did I do wrong and what does this note meen? the username and passoword in the test – what are these? if it is a password and username of the server then probably I don’t know it, cause I have rented the server (hosting service).

    Thank you in advance

  44. Ashley
    December 3, 2009

    That sort of looks like you haven’t saved the settings in the Magento admin before running the self test, please make sure you do that first and if you still have problems with it let me know.

  45. Dennis
    December 22, 2009

    Hi… we have installed your extension and it works fine so far for all emails on Magento 1.3.2.4! From time to time we are encountering problems with our smtp server so that it is down for just a couple of minutes. We thought of what would happen if someone tries to use the contact form, makes a purchase or the store owner sends confirmation emails (invoice etc) during the downtime of the server when it is temporarily unavailable. We entered wrong connection data in your extension’s config to simulate a not working connection with the following result:
    1. The contact form displays an error message on the screen informing the customer that there are technical problems and he/she should try again later.
    2. When a purchase is completed it is displayed that everything is ok and an email was just send to the customer which was not the case due to wrong settings. Order information in backend displays that the customer was informed.
    3. When sending an invoice, shipping or whatever confirmation the system does not display an error and behaves like everything worked out just fine.

    My question is what can we do to ensure that no email is getting lost when the smtp server is temporarily unavailable? Thx for your great work so far!!!

  46. Ashley
    December 22, 2009

    Hi, Thanks for the informative comment. Firstly, if you have times when your SMTP server is down, consider migrating to an always-up smtp server like smtp.gmail.com 🙂 But more generally, if the smtp server is down then the behavior of my extension is going to be the same as the default Magento, because it is only the transport that changes, not the logic around error handling and return values. It’s a much bigger job to start trying to change the error handling, because there’s so much more testing involved.
    For example, if the order is made but the email send fails and throws an exception reporting that – the order code needs to handle that, and if it doesn’t then silly things (like the order not saving) might happen.

    One thing the extension could do, is persist some queue of attempted emails that it retries periodically. I think that kind of change would take a bit of effort, but it’d be quite cool. I’ll add it to the proposed features list for the next version.

    Cheers,
    Ashley

  47. Andi
    January 14, 2010

    Hi Ashley.. Thank you for your efforts on this one – You mod has solved a really big issue here :o)

    Have noticed a rather problematic situation though…

    So far the following emails are sending fine…
    1, Order Confirmations
    2, Invoice Confirmations
    3, Shipping Confirmation
    4, Password Notifications

    But… None of the Newsletter Subscription emails are working at all…
    1, Subscription Requests
    2, Subscription Confirmations
    3, Un-subscription Confirmations

    Double Opt-in can’t function without this either.

    We have not been able to test any newsletter batches as yet but are hoping to do so if the above can be tweaked??

    Thanks again for all your efforts on this It really is a fantastic mod!!

    Looking forward to hearing your initial thoughts
    Andi

  48. Andi
    January 14, 2010

    😮

  49. Ashley
    January 17, 2010

    Sounds like an extension is clashing, do you have some sort of 3rd party plugin for email newsletter stuff?

  50. Andi
    January 19, 2010

    Hi Ashley,
    Thanks for your reply.

    I thought that this may be the case at first but we have ‘Maison du Logiciel’s Extension Conflict extension’ installed and it is showing no compatibility conflicts with any of the following…

    /newsletter /template/Aschroder_SMTPPro_Model_Newsletter_Template
    /email/Aschroder_SMTPPro_Model_Email
    /email_template/Aschroder_SMTPPro_Model_Email_Template

    We currently don’t have any newsletter or email extensions / 3rd party plugin’s installed but I have combed through all of the functions that I thought may be causing this behavior but so far I have not found anything.

    The only extension that I thought may have been the culprit, if there was one, is ‘Mage-World.com FreeQuickContact extension’ but I am 100% sure it’s not.

Comment navigation
Newer Comments →

Comments are closed.

© ASchroder.com 2023
Storefront designed by WooCommerce.