{"id":13378,"date":"2017-10-18T15:15:04","date_gmt":"2017-10-18T19:15:04","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/use-custom-email-server-for-magento-based-ecommerce-shops\/"},"modified":"2019-12-06T14:02:52","modified_gmt":"2019-12-06T19:02:52","slug":"use-custom-email-server-for-magento-based-ecommerce-shops","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=13378","title":{"rendered":"Use custom email server for Magento based ecommerce shops"},"content":{"rendered":"<p>Use custom email server for Magento based ecommerce shops<\/p>\n<p>You will need to change code on the file : <code>app\/code\/core\/Mage\/Core\/Model\/Email\/Template.php<\/code><\/p>\n<p><code>Comment out the existing <\/code>getMail() method.<\/p>\n<p>And replace the method with the following code.<\/p>\n<p>Remember: changing the core Magento code is not the greatest idea as upgrade of Magento will eventually become a big issue at a later time (if you keep doing this).<\/p>\n<p>You can consider this as a quick test if you can make external mail server working with magento. However, ideally you need to take a better approach.<\/p>\n<pre style=''>\r\npublic function getMail()\r\n    {\r\n        if (is_null($this->_mail)) {\r\n\r\n            \/*Start of added code to specify config*\/\r\n            $my_smtp_host = Mage::getStoreConfig('system\/smtp\/host');\r\n            $my_smtp_port = Mage::getStoreConfig('system\/smtp\/port'); \r\n\r\n            $config = array(\r\n                    'ssl' => 'tls',\r\n                    'port' => $my_smtp_port,\r\n                    'auth' => 'login',\r\n                    'username' => 'account@gmail.com',\r\n                    'password' => 'secret'\r\n            );\r\n\r\n            $transport = new Zend_Mail_Transport_Smtp($my_smtp_host, $config);\r\n\r\n            Zend_Mail::setDefaultTransport($transport);\r\n            \/*End of added code to specify config*\/\r\n\r\n            $this->_mail = new Zend_Mail('utf-8');\r\n        }\r\n        return $this->_mail;\r\n    }\r\n<\/pre>\n<pre><code><a href=\"https:\/\/stackoverflow.com\/questions\/11558156\/magento-how-enable-smtp-server-authentication-and-secure-transport\">https:\/\/stackoverflow.com\/questions\/11558156\/magento-how-enable-smtp-server-authentication-and-secure-transport<\/a>\r\n<\/code><\/pre>\n<pre><code>\r\n<\/code><\/pre>\n<pre><code>\r\n<\/code><\/pre>\n<p>Sayed Ahmed<br \/>\n647-624-8509, sayedum<\/p>\n<p>Linkedin: <a href=\"https:\/\/ca.linkedin.com\/in\/sayedjustetc\">https:\/\/ca.linkedin.com\/in\/sayedjustetc<\/a><\/p>\n<p>Blog: <a href=\"http:\/\/sitestree.com\">http:\/\/sitestree.com<\/a>, <a href=\"http:\/\/bangla.salearningschool.com\">http:\/\/bangla.salearningschool.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use custom email server for Magento based ecommerce shops You will need to change code on the file : app\/code\/core\/Mage\/Core\/Model\/Email\/Template.php Comment out the existing getMail() method. And replace the method with the following code. Remember: changing the core Magento code is not the greatest idea as upgrade of Magento will eventually become a big issue &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=13378\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1907,182],"tags":[],"class_list":["post-13378","post","type-post","status-publish","format-standard","hentry","category-magento-2","category---blog","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":15982,"url":"http:\/\/bangla.sitestree.com\/?p=15982","url_meta":{"origin":13378,"position":0},"title":"Magento 2: Misc Stuff","author":"Sayed","date":"August 17, 2019","format":false,"excerpt":"How to Upgrade Magento Version from 2.2.x to 2.3.0? http:\/\/www.codextblog.com\/magento-2\/upgrade-magento-version-2-2-x-2-3-0\/ --- Back up and roll back the file system, media, and database https:\/\/devdocs.magento.com\/guides\/v2.3\/install-gde\/install\/cli\/install-cli-backup.html --- System Upgrade: conflicting component dependencies https:\/\/community.magento.com\/t5\/Magento-2-x-Version-Upgrades\/System-Upgrade-conflicting-component-dependencies\/td-p\/27404 --- Set the Magento mode https:\/\/devdocs.magento.com\/guides\/v2.3\/config-guide\/cli\/config-cli-subcommands-mode.html --- Command-line upgrade https:\/\/devdocs.magento.com\/guides\/v2.3\/comp-mgr\/cli\/cli-upgrade.html --- Update and upgrade checklist https:\/\/devdocs.magento.com\/guides\/v2.3\/comp-mgr\/prereq\/prereq_compman-checklist.html --- dry run example\u2026","rel":"","context":"In &quot;Magento 2&quot;","block_context":{"text":"Magento 2","link":"http:\/\/bangla.sitestree.com\/?cat=1907"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":15993,"url":"http:\/\/bangla.sitestree.com\/?p=15993","url_meta":{"origin":13378,"position":1},"title":"Administering Magento 2","author":"Sayed","date":"August 29, 2019","format":false,"excerpt":"Magento 2 file\/folder permissions setting https:\/\/magehit.com\/blog\/magento-2-file-folder-permissions-setting\/ Magento 2: Run Unit Tests https:\/\/devdocs.magento.com\/guides\/v2.3\/config-guide\/cli\/config-cli-subcommands-test.html Install M2E PRO via Magento Marketplace https:\/\/docs.m2epro.com\/display\/InstallationUpgradeMagento2\/via+Magento+Marketplace M2E Pro - installation options https:\/\/docs.m2epro.com\/display\/InstallationUpgradeMagento2\/Home Magento 2: Cron Configuration https:\/\/firebearstudio.com\/blog\/magento-2-cron-configuration.html","rel":"","context":"In &quot;Magento 2&quot;","block_context":{"text":"Magento 2","link":"http:\/\/bangla.sitestree.com\/?cat=1907"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26168,"url":"http:\/\/bangla.sitestree.com\/?p=26168","url_meta":{"origin":13378,"position":2},"title":"Administering Magento 2 #Root","author":"Author-Check- Article-or-Video","date":"April 18, 2021","format":false,"excerpt":"Magento 2 file\/folder permissions setting https:\/\/magehit.com\/blog\/magento-2-file-folder-permissions-setting\/ Magento 2: Run Unit Tests https:\/\/devdocs.magento.com\/guides\/v2.3\/config-guide\/cli\/config-cli-subcommands-test.html Install M2E PRO via Magento Marketplace https:\/\/docs.m2epro.com\/display\/InstallationUpgradeMagento2\/via+Magento+Marketplace M2E Pro - installation options https:\/\/docs.m2epro.com\/display\/InstallationUpgradeMagento2\/Home Magento 2: Cron Configuration https:\/\/firebearstudio.com\/blog\/magento-2-cron-configuration.html From: http:\/\/sitestree.com\/administering-magento-2\/ Categories:RootTags: Post Data:2019-08-30 12:24:44 Shop Online: https:\/\/www.ShopForSoul.com\/ (Big Data, Cloud, Security, Machine Learning): Courses: http:\/\/Training.SitesTree.com In Bengali: http:\/\/Bangla.SaLearningSchool.com\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":72892,"url":"http:\/\/bangla.sitestree.com\/?p=72892","url_meta":{"origin":13378,"position":3},"title":"aws magento 2 php check log check how to config deal with errors","author":"Sayed","date":"March 1, 2022","format":false,"excerpt":"https:\/\/youtu.be\/MlHXYeohfEM","rel":"","context":"In &quot;From Youtube Channel&quot;","block_context":{"text":"From Youtube Channel","link":"http:\/\/bangla.sitestree.com\/?cat=1952"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/MlHXYeohfEM\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":16469,"url":"http:\/\/bangla.sitestree.com\/?p=16469","url_meta":{"origin":13378,"position":4},"title":"Administering Magento 2 on AWS Platform","author":"Sayed","date":"December 6, 2019","format":false,"excerpt":"Varnish: Configuring Varnish Server i.e. a Cache Server https:\/\/varnish-cache.org\/docs\/5.1\/reference\/varnishd.html#http-resp-hdr-len \/opt\/bitnami\/varnish\/varnishd varnishd [-a address[:port][,PROTO]] [-b host[:port]] [-C] [-d] [-F] [-f config] [-h type[,options]] [-I clifile] [-i identity] [-j jail[,jailoptions]] [-l vsl[,vsm]] [-M address:port] [-n name] [-P file] [-p param=value] [-r param[,param...]] [-S secret-file] [-s [name=]kind[,options]] [-T address[:port]] [-t TTL] [-V] [-W\u2026","rel":"","context":"In &quot;AI ML DS RL DL NN NLP Data Mining Optimization&quot;","block_context":{"text":"AI ML DS RL DL NN NLP Data Mining Optimization","link":"http:\/\/bangla.sitestree.com\/?cat=1910"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":67572,"url":"http:\/\/bangla.sitestree.com\/?p=67572","url_meta":{"origin":13378,"position":5},"title":"Ecommerce related Plugins Explored and\/or used #ecommerce","author":"Author-Check- Article-or-Video","date":"July 25, 2021","format":false,"excerpt":"Ecommerce related Plugins Explored (primarily) and\/or used \u00a0 To integrate with the DropShip functionality of DealExtreme (I do not know if DealExtreme is reliable or not): http:\/\/xml-import.eu\/dealextreme-dropshipping-integration\/ \u00a0 Synchronize Magento with Amazon: products, stock levels, sales and shipments. https:\/\/www.magentocommerce.com\/magento-connect\/amazon-1.html \u00a0 Import Amazon products to Magento https:\/\/web-experiment.info\/magento-amazon-products-manager \u00a0 eBay-Amazon-Rakuten-Magento Integration -\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/13378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13378"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/13378\/revisions"}],"predecessor-version":[{"id":13380,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/13378\/revisions\/13380"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13378"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}