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.
- supports self testing right from the Magento admin UI
- logs friendly messages if you enable logging in var/log
- has helpful comments to guide you when configuring
- 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:
And also a screenshot of a successful self test result:
If you have any comments, suggestions or feedback, please let me know.
Hi,
where can i find the extension?
Best regards
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
It’s published:
http://www.magentocommerce.com/extension/1865
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
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?
Sounds awesome.
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…
STATUS is alpha can i use it for production shop site?
does this solve the spam problem a bid 🙂 ?
thanks bluecos
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?
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?
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 🙂
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)
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?
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
oh … my fault. wrong directions in the pear.ini
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.
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
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
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?
The uninstall function does not work well. And it might have some conflict with other smtp plugin…..
Another thing is that it does not work well with multiple virtual hosts.
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.
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!
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.
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
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?
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.
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!
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.
Have you saved before running the test? Looks like an empty SMTP hostname to me?
Ashley,
Yes that did it. I also had to be sure to include 25 as the port number and not leave it blank.
Thanks!
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?
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
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.
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?
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.
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?
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!
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!
Hi, it’s very simple plain text. It looks like this:
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!
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!
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
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.
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!!!
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
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
😮
Sounds like an extension is clashing, do you have some sort of 3rd party plugin for email newsletter stuff?
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.