{"id":2211,"date":"2012-06-18T11:44:53","date_gmt":"2012-06-18T08:44:53","guid":{"rendered":"http:\/\/railsware.com\/blog\/?p=2211"},"modified":"2023-11-27T16:35:40","modified_gmt":"2023-11-27T13:35:40","slug":"remove-qa-headache-while-testing-email-delivery","status":"publish","type":"post","link":"https:\/\/railsware.com\/blog\/remove-qa-headache-while-testing-email-delivery\/","title":{"rendered":"Remove QA headache while testing email delivery"},"content":{"rendered":"\n<p>Are you a QA <a href=\"https:\/\/railsware.com\/railswarians\/\">engineer<\/a> or tester? Have you ever sent emails to real users by mistake? Did you have to create additional email accounts for testing and was it difficult to trace emails from a bunch of mailboxes? If your answer is \u201cYes\u201d for at least one question, this article would be useful for you.<\/p>\n\n\n\n<p>I am a QA engineer who works on different projects and all of them are web-applications which have at least one feature connected to email delivery. For instance, \u201cSignUp\u201d feature, though, surely, there are more and more of them. Users should get email notifications not only in case of password reminder or <a href=\"https:\/\/www.usebouncer.com\/best-email-verification-tools\/\" title=\"email verification\">email verification<\/a>, they also get tons of emails about their activity on application, additional information about new possibilities and functionality, or any other actual, urgent and new information.<\/p>\n\n\n\n<p>While testing different type of emails, I might do a lot of boring tasks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>create huge amounts of real unique emails for new users registration<\/li>\n\n\n\n<li>check letters with different content to different users with different roles<\/li>\n\n\n\n<li>be attentive while checking emails on some mail services which group letters with similar subject name<br>make a lot of extra mouse clicks<\/li>\n<\/ul>\n\n\n\n<p>It also happened that during new feature <a href=\"https:\/\/railsware.com\/web\/\">development<\/a> and its testing, some letters accidentally had been sent to real users. On some projects, <a href=\"https:\/\/railsware.com\/careers\/\">developers<\/a> setup users database by cloning it from production with all information: their personal, contact data and emails. It happened to me once while testing a new feature that I sent for about 100 letters to real users. It wasn&#8217;t so critical and they didn&#8217;t suffer much, but still it happened. And I know a case when more than 100000 emails were delivered to real users by mistake! Not good, right?<\/p>\n\n\n\n<p>So we came with an idea of creating a simple but effective application which will help to easily test email distribution, not affecting real customers and which may be also useful not only for Railsware engineers but to other QA and developers all over the world.<\/p>\n\n\n\n<p>And we did it!<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Here is \u201cMailtrap\u201d<\/h5>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Home-page1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1345\" height=\"1063\" src=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Home-page1.png\" alt=\"\" class=\"wp-image-2401\" title=\"Home page\" srcset=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Home-page1.png 1345w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Home-page1-300x237.png 300w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Home-page1-1024x809.png 1024w\" sizes=\"auto, (max-width: 1345px) 100vw, 1345px\" \/><\/a><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">What is Mailtrap?<\/h5>\n\n\n\n<p>Mailtrap is a simple and easy to use application designed and developed by Railsware. It is aimed to test email delivery functionality and catch all emails sent from staging server and not harm real users. It is easy to setup and user friendly.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">What are the benefits of using Mailtrap?<\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li>First one and the most important benefit is that I have an ability to collect all sent emails from different projects in one Mailtrap account and view them online easily.<a href=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-inboxes3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2409 size-full\" title=\"List of inboxes\" src=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-inboxes3.png\" alt=\"List of inboxes. Ruby on Rails application\" width=\"1334\" height=\"762\" srcset=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-inboxes3.png 1334w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-inboxes3-300x171.png 300w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-inboxes3-1024x584.png 1024w\" sizes=\"auto, (max-width: 1334px) 100vw, 1334px\" \/><\/a>After I started using Mailtrap, the only need which drives me to a real inboxes and services (like Google, Yahoo, and so on) is to check whether layout is still ok and not broken. For that, I just forward my email manually to a proper account. In other cases, I just use Mailtrap.<\/li>\n\n\n\n<li>The second and also a huge benefit is that I stopped creating bunch of new accounts and use a real one for testing. I can enter any valid-email-looking address and I&#8217;ll get a message sent on it. So, I shouldn&#8217;t create additional mailboxes anymore!<\/li>\n\n\n\n<li>If I want to share any received email with my team members, it&#8217;s not necessary to<br>forward it, I can just copy URL and send it. It could also be used while bug posting for the reference, as the URL is static.<\/li>\n\n\n\n<li>In Mailtrap, I have an ability to forward email to certain addresses.<br>Such cases like:\n<p>&nbsp;<\/p>\n<div>&#8211; there are some exceptions or errors on stage server and all<br>emails are caught by Mailtrap<\/div>\n<div>&#8211; developers don&#8217;t use Mailtrap every minute<\/div>\n<div>&#8211; they are more attentive to their real mailboxes<\/div>\n<p>So, I just have to put email addresses of recipients in a text area, and they will get all notifications.<\/p>\n<figure><a href=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Account-settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2408 size-full\" title=\"Account settings\" src=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Account-settings.png\" alt=\"Account settings. RoR development.\" width=\"1342\" height=\"763\" srcset=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Account-settings.png 1342w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Account-settings-300x170.png 300w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Account-settings-1024x582.png 1024w\" sizes=\"auto, (max-width: 1342px) 100vw, 1342px\" \/><\/a><\/figure><p><\/p>\n<\/li>\n\n\n\n<li>Mailtrap is also a good solution for layout testing. While using it, I have an ability to check emails with html, txt, message source code view, CSS reseting.<br><a href=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Developer-tools.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2402 size-full\" title=\"Developer-tools\" src=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Developer-tools.jpg\" alt=\"Rails Developer tools. QA\" width=\"877\" height=\"97\" srcset=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Developer-tools.jpg 877w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Developer-tools-300x33.jpg 300w\" sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/a><\/li>\n\n\n\n<li>Each Mailtrap user can share his inboxes with team members or give access to them to any user of certain domain group. It is very simple, just put email of a team member or domain name to the proper field and click Add.<\/li>\n\n\n\n<li>Mailtrap is easy to set up and is adapted to different programming languages.<br><a href=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-languages.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2410 size-full\" title=\"List of languages\" src=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-languages.png\" alt=\"List of languages. Ruby development\" width=\"1329\" height=\"763\" srcset=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-languages.png 1329w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-languages-300x172.png 300w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-languages-1024x587.png 1024w\" sizes=\"auto, (max-width: 1329px) 100vw, 1329px\" \/><\/a>After registration, you get Mailtrap&#8217;s SMTP settings and credentials, which you should place to your application configuration (non-production environment). And that\u2019s all, all emails will be trapped but still available for you to operate with.<\/li>\n\n\n\n<li>Mailtrap keeps all your email history and attachments.<a href=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-emails.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2411 size-full\" title=\"List of emails\" src=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-emails.png\" alt=\"List of emails. RoR development\" width=\"1338\" height=\"766\" srcset=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-emails.png 1338w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-emails-300x171.png 300w, https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/List-of-emails-1024x586.png 1024w\" sizes=\"auto, (max-width: 1338px) 100vw, 1338px\" \/><\/a><\/li>\n\n\n\n<li>And it\u2019s totally FREE for everybody. Yay! ))<\/li>\n<\/ol>\n\n\n\n<p>It&#8217;s easy, useful, and indispensable in testing.<\/p>\n\n\n\n<p>Use and Enjoy!<\/p>\n\n\n\n<p>You can also check video with Mailtrap presentation from Railsberry Lightning talks by Yaroslav Lazor <a title=\"here\" href=\"https:\/\/www.youtube.com\/watch?v=hI8SntSzxqQ&amp;list=UUgFKcB8MmTciDtaMUoEW7Ng\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you a QA engineer or tester? Have you ever sent emails to real users by mistake? Did you have to create additional email accounts for testing and was it difficult to trace emails from a bunch of mailboxes? If your answer is \u201cYes\u201d for at least one question, this article would be useful for&#8230;<\/p>\n","protected":false},"author":46,"featured_media":7466,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[364],"tags":[],"coauthors":["Anna Gorshkova"],"class_list":["post-2211","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-labs"],"acf":[],"aioseo_notices":[],"categories_data":[{"name":"Labs","link":"https:\/\/railsware.com\/blog?category=labs"}],"post_thumbnails":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/06\/Home-page1.png","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/2211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/comments?post=2211"}],"version-history":[{"count":91,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/2211\/revisions"}],"predecessor-version":[{"id":16711,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/2211\/revisions\/16711"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/media\/7466"}],"wp:attachment":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/media?parent=2211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/categories?post=2211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/tags?post=2211"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/coauthors?post=2211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}