Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2542,"date":"2019-12-06T14:15:55","date_gmt":"2019-12-06T14:15:55","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2542"},"modified":"2019-12-11T00:38:22","modified_gmt":"2019-12-11T00:38:22","slug":"install-mailcatcher-on-centos-7","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/install-mailcatcher-on-centos-7\/","title":{"rendered":"Install MailCatcher On CentOS 7"},"content":{"rendered":"

Introduction<\/strong><\/h3>\n

MailCatcher<\/strong>\u00a0is a tool that provides an easy way for developers to\u00a0inspect emails that their applications<\/strong>\u00a0send out without having to wait for an email provider. It catches all emails that it receives, and stores them for display.\u00a0Both HTML<\/strong>\u00a0and plain text messages are supported.<\/p>\n

Installation<\/h3>\n

First\u00a0update yum’s repository list<\/strong>, then install the\u00a0gcc and g++ compilers<\/strong>, and\u00a0MailCatcher’s<\/strong>\u00a0dependencies\u00a0(Ruby and SQLite)<\/strong>.<\/p>\n

sudo yum update\r\nsudo yum -y install gcc gcc-c++\r\nsudo yum -y install sqlite-devel ruby-devel\r\n<\/code><\/pre>\n

Install MailCatcher.<\/strong><\/p>\n

sudo gem install mailcatcher\r\n<\/code><\/pre>\n

Running MailCatcher<\/strong><\/h3>\n

Once installed<\/strong>, you can run\u00a0mailcatcher --help<\/code>\u00a0to see what options are available.<\/p>\n

Start\u00a0MailCatcher<\/strong>\u00a0by running\u00a0mailcatcher --ip [your-akl-web-host-ip-address]<\/code>\u00a0on your terminal.\u00a0Your output should look similar to the following:<\/strong><\/p>\n

root@install:~# mailcatcher --ip [your-akl-web-host-ip-address]\r\nStarting MailCatcher\r\n==> smtp:\/\/[your-akl-web-host-ip-address]:1025\r\n==> http:\/\/[your-akl-web-host-ip-address]:1080\r\n*** MailCatcher runs as a daemon by default. Go to the web interface to quit.\r\n<\/code><\/pre>\n

Browse<\/strong>\u00a0to\u00a0http:\/\/[your-akl-web-host-ip-address]:1080<\/code>\u00a0and you’ll see\u00a0MailCatcher’s web interface<\/strong>. Configure your application to use an\u00a0SMTP host<\/strong>\u00a0of your AKLWEB Host IP Address and port\u00a01025<\/strong>\u00a0and send out some test emails. These emails will appear on MailCatcher’s web interface.<\/p>\n

NOTE<\/strong>: If you don’t see\u00a0MailCatcher’s web interface<\/strong>, then you may have to open port\u00a01080<\/strong>\u00a0and enable\u00a0“http service”<\/strong>\u00a0on CentOS firewall. Run the\u00a0commands below<\/strong>, then try accessing\u00a0http:\/\/[your-akl-web-host-ip-address]:1080<\/code>\u00a0from your web browser again.<\/p>\n

sudo firewall-cmd --zone=public --add-port=1080\/tcp --permanent\r\nsudo firewall-cmd --zone=public --add-service=http --permanent\r\nsudo firewall-cmd --reload\r\n<\/code><\/pre>\n

Conclusion<\/strong><\/h3>\n

MailCatcher can really ease up the development and testing workflow<\/strong>, as it takes out the need for a mail provider to catch and view emails. Consider trying it for your next application.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[231,244],"manual_kb_tag":[340],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2542"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2542"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2542\/revisions"}],"predecessor-version":[{"id":2543,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2542\/revisions\/2543"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2542"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2542"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}