It’s been a while since I have written any updates on my Gmail and Google Apps email extension for Magento. I have just released version 0.5 and thought now would be a good opportunity to write a quick update on the changes and what I have planned for SMTP email support in Magento.
Version 0.5 of Google Apps Email/Gmail Magento Extension
Firstly the changes in the latest release of the Google Apps/Gmail Magento extension. Both have been inspired by user feedback so two ‘thank you’s to follow. Firstly thanks to Blue Acorn for pointing out the lack of multi-store capability on the self test. It’s actually a little clunky getting the store parameters in the admin of Magento, my custom button needed to add the parameter like so:
$buttonBlock = $this->getElement()->getForm()->getParent()->getLayout()->createBlock('adminhtml/widget_button'); $params = array( 'website' => $buttonBlock->getRequest()->getParam('website') ); $url = Mage::helper('adminhtml')->getUrl("googleappsmailtest", $params);
And then the controller needed to actually pick up which Magento store to get the config for:
$websiteModel = Mage::app()->getWebsite($this->getRequest()->getParam('website')); $to = Mage::getStoreConfig('contacts/email/recipient_email', $websiteModel->getId());
The other change was a bit of a curve ball. I had a Magento + Gmail user named Matt contacted me with what seemed to be an unrelated issue. I have been poking around in the installation code trying to figure out what has been happening. It wasn’t until I did a full fresh install on Magento 220.127.116.11 that I noticed what was going on. My extension has a dependency on Mage_Core (obviously, right?) and the wiki guide on how to package Magento extensions says to include this dependency. However if you do then the downloader will download the Core files and a whole bunch of other required files. This is no problem if you have been a good boy or girl and made your changes to the themes outside of the default files, but if you have changed the default templates then there is a risk of your changes being lost!
So, the change is to remove this dependency, even though the guide says it should be there. It’s kind of obvious that you need Magento in order to run my extension anyway!
Magento SMTP support
The other update I wanted to post was that I am working on porting my Magento Gmail / Google Apps extension to also support full SMTP capability. I will be releasing the changes as a new extension, as it is important to me that the original goal of this extension (extreme simplicity and ease of use) is not lost under the weight of full SMTP configuration.
I know that there is already an older SMTP extension for Magento. I think I can improve upon it in several ways, I have developed Magento SMTP self test capability, and I have support for Magento newsletter sending. The current SMTP extension hasn’t been updated for nearly a year, and I have an opportunity to create a more modern, user friendly extension.
I’ll be working on it over the next few days and would invite feedback from anyone with ideas on ways to improve the Magento SMTP functionality.