Magento2 Custom SMTP

Custom SMTP for Magento2 : An expansion presenting with best features for the consumers. The easily accessible and user friendly magento extension is on its way to make the work more convenient and affordable for the users. Custom SMTP is one of the most exclusive extensions which will help merchant to control the server settings for sending magento emails using personalized email server. The direct use of customized server enhances the use of this magento extension to be more handy and easy accessible.
This extension gives the entire control of email settings for Magento. Consumer can configure any custom SMTP server mail directly such as Gmail, AWS and many more.
This extension is purely dynamic as it gives convenience of directly sending the magento mails using customized server instead of sending them through server indirectly.

Extension : Magento2 Custom SMTP
GIT : Code Base

How to use Registry Object in Magento 2.0

Magento 2.0 have a registry object that should help easy the transition for extensions. The class is Magento\Framework\Registry, and you can inject it in any constructo

public function __construct(//... 
    \Magento\Framework\Registry $registry,
    $this->registry     = $registry;

and then set variables with

$this->registry->register('test_var', 'this is a test!');

and fetch those variables back (even from a differnt object – Magento\Framework\Registry is a shared/singleton object)

echo $this->registry->registry('test_var');

How to run cron in Magento 2.0

Magento Recommends 3 type of cron are introduced in magento-2 as given below

*/1 * * * * php -c /path/to/magento2/bin/magento cron:run 
*/1 * * * * php -c /path/to/magento2/bin/magento/update/cron.php 
*/1 * * * * php -c /path/to/magento2/bin/magento setup:cron:run 

but we do not need to configure all of them ,

1st cron command will work for reindexes indexers, send automated e-mails, generates the sitemap, and so on.

rest 2 cron commands are used by the Component Manager and System Upgrade.

To congfigiure CRON, edit crontab command line

crontab -u magento_user -e

add this line at the end of file

* * * * * php -c /path/to/magento2/bin/magento cron:run

# this will run every minute
if you do not want every minute you can set every 5 min as given below:

*/5 * * * * php -c /path/to/magento2/bin/magento cron:run

Magento 2.0 : static files links not working

Magento 2.0 is released, however there may be various issues that a Developer might go through.One of the prime concern would be: Broken Links for Static files like js, css & images etc.
links will not work in following cases:

  • Installation of Magento 2.0 in Windows
  • Moving the folders to any other location
  • Migrating your current magento 2.0 to another server or go live

So if you face such kind of issues, and your admin and front end link’s are not functioning accordingly,
and all static file links are not working because of symlinks created by Magento for Static content.

please follow the below steps to fix the same:

  • Remove all files and folders , except .htaccess file from


  • Open /magento2path/app/etc/di.xml
    • if you want to remove symlinks then edit app/etc/di.xml file. or if you just want to fix symlinks than do not edit app/etc/di.xml
    • find following code
      <virtualType name="developerMaterialization" type="MagentoFrameworkAppViewAssetMaterializationStrategyFactory">
      <argument name="strategiesList" xsi:type="array">
      <item name="view_preprocessed" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategySymlink</item>
      <item name="default" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategyCopy</item>
    • replace to “MagentoFrameworkAppViewAssetMaterializationStrategyCopy”
  • remove all cache & setup cache files
    • rm -rf var/cache/ var/di/ var/generation/ var/page_cache/
  • Deploy Static Content again
    • bin/magento setup:static-content:deploy

NOTE: Make sure you have backup for pub/static folder


New Extension : Magento 2 : Product Thumbnail in Sales Emails

This module will enable product image thumbnail on sales email.

Download the code from Below URL

Installation Email Images Module

1 Upload new module to Magento2 root folder

run following commands:

2 Install New Module

bin/magento module:enable EmizenTech_NewModule

3 Run Setup

bin/magento setup:upgrade

4 DI configuration & cache must be cleared

rm -rf var/cache/ var/di/ var/generation/ var/page_cache/

5 Compile ( if you have compilation enabled )

bin/magento setup:di:compile

6 Login into admin

to Enable Module : go to
Stores -> Configuration ->
Sales :: Sales Emails :: Sales Email Image Setting

Enable :: Yes

Image Resize :: 135 {Set your preffered size here}