Custom email server (transport) with Magento

13 Comments 12th MAR 2010 | Posted by Branko Ajzele in Magento

Custom email server (transport) with Magento

Magento has quite interesting email sending capabilities. However, those are more in terms of email templates then selecting a non-built in email server. Sometimes, your web hosting might have separate mail server and even the simple php send mail does not work. In such cases you are forced to use an external mail server that supports SMTP. Good example of this is a Gmail.

So, how do we “switch” our Magento to use Gmail? Here is a small extension I wrote for my self. Figured why not give it away.

Download Ajzele_MailTransport extension.

And here is a little screenshot that shows the available config options.

As always, use at your own risk :)

If you like what you read, please share it.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Yahoo! Bookmarks
  • Reddit
  • Technorati
  • Twitter
  • StumbleUpon
  • LinkedIn
  • Netvibes
  • NewsVine
  • Sphinn
  • Tumblr
  • Posterous

To post code in comments, place your code inside [code] and [/code] tags.

There are 13 comments (Add Yours +)

  • Hello,

    I install and gote this message when use the contact us: Unable to submit your request. Please, try again later

    and the port? that is not supost to have a setup option for you put the port for gmail?

    thank you,

    Darley

  • A heads-up, a site I took over which was not developed by me, using a popular Gmail extension, recently, client reported a number of customers couldn’t do the checkout at the last Review step, but a few were able to during the same period. I only got a chance to look into the issue late at night after the site came back to normal, couldn’t find anything except in the report folder, there were some 35 reports related to that Gmail extension, the date and hours match the checkout issue customers ran into.

    I weren’t able to replicate the problem but pretty sure it was caused by Google mail server, it appeared that Google mail server had connection issue during those hours, and Magento was not able to receive a notification; one persistent customer tried to checkout a 3 times and the third went through, somehow his email was not being recorded (how could this ever happened still is a big puzzle to me) which resulted client not able to send a comment to him (client was not aware that missing email was the issue), to add insult to injury, the server had a sql connection issue in the same day – this three issues caused a big panic.

    I am still not sure how could that Google mail server connection issue causing checkout not being able to execute, shouldn’t it be that cilent and customer not able to receive order email only?!

  • This is the very thing I’m looking for, thanks!

    Also here is an old thread from Magento Forum of discussing the similar thing: http://www.magentocommerce.com/boards/viewthread/1073/

  • how do I install this? I transfer all the file under community. But it doesn’t do anything. I did refresh cache as well.

    Thanks,

    JC

  • Will this work in 1.3.2.4?

  • Hello i get error

    Undefined class constant ‘XML_PATH_SENDING_SET_RETURN_PATH’

    at $setReturnPath = Mage::getStoreConfig(self::XML_PATH_SENDING_SET_RETURN_PATH);

    here should be
    $setReturnPath = Mage::getStoreConfigFlag(Mage_Newsletter_Model_Subscriber::XML_PATH_SENDING_SET_RETURN_PATH);

    But these settings are in fact belong to the newsletter?

    ————-
    ? ?????????

  • My site it´s still in test, obviously
    I have the same error as Darley Cassimiro.
    When I use the contact form, I get the message: Unable to submit your request. Please, try again later

  • Just found another extension from Magento Connect for similar purpose, hope this is helpful to you guys:
    http://www.magentocommerce.com/extension/1326/aschroder.com-google-apps-email-gmail

  • I have some issues with this extension in Magento 1.4.0.1

  • I take it back. It works in Magento 1.4.01. Just make sure to delete the cache after install

  • Bit thank you to the author for making it available

  • Dema501 already mentioned the error:
    Undefined class constant ‘XML_PATH_SENDING_SET_RETURN_PATH’

    This comes up because this plugin is developed for 1.4 and breaks for versions below. To fix it just add the following:

    const XML_PATH_SENDING_SET_RETURN_PATH = 'system/smtp/set_return_path';
    const XML_PATH_SENDING_RETURN_PATH_EMAIL = 'system/smtp/return_path_email';

    in class Ajzele_MailTransport_Model_Core_Email_Template after line:


    ' const MODULE_SETTINGS_PATH = 'ajzele_mail_transport';

    I hope it helps

  • For Magento version 1.2.1.1 I was getting error that Zend_Validate_Hostname_Com class does not exist when orders were placed and emails were not send neither when orders placed nor when orders invoiced

    I followed a post online where the solutions was to copy/rename Zend_Validate_Hostname_De to Zend_Validate_Hostname_Com. It worked for me and know emails is being sent

    I looked in mangeto version 1.4 and there is class Zend_Validate_Hostname_Com and that’s probably why this plugin worked right the way for magento version 1.4

Leave a Comment

Please wrap all source codes with [code][/code] tags.
Magento Design and Development | Magento SEO | iPhone Application Development Web Application Development with ZEND | WordPress Ecommerce | WordPress development
Sitemap

Inchoo - webappsolutions | 2009