UNPKG

@incdevco/framework

Version:
367 lines (292 loc) 39.9 kB
var Expect = require('chai').expect; var Mock = require('../../mock'); var Sinon = require('sinon'); var EmailHook = require('./index'); describe('lambda email-hook', function () { 'use strict'; var config, lambda, mock, sandbox; beforeEach(function () { config = {}; lambda = new EmailHook(config); mock = new Mock(); sandbox = Sinon.sandbox.create(); sandbox.stub(lambda, 'log'); }); afterEach(function () { mock.restore(); sandbox.verifyAndRestore(); }); describe('handleEmail', function() { it('should', function (done) { var content, message, event, expected; content = 'content'; message = { mail: { destination: [ 'email@address.com' ] } }; event = 'event'; expected = 'expected'; lambda.register('email@address.com', function (actualMessage, actualContent) { Expect(message).to.deep.equal(message, 'message'); Expect(content).to.deep.equal(content, 'content'); return expected; }); lambda.handleEmail(message, content) .then(function (result) { Expect(result).to.equal(expected, 'result'); return mock.done(done); }) .catch(done); }); }); describe('handler', function() { var content, event, expected, message; beforeEach(function() { expected = 'expected'; content = { "date": new Date('2016-11-29T18:24:21.000Z'), "from": [ { "address": "shawn@skostler.com", "name": "Shawn Ostler", } ], "headers": { "authentication-results": "amazonses.com; spf=none (spfCheck: 209.85.217.169 is neither permitted nor denied by domain of skostler.com) client-ip=209.85.217.169; envelope-from=shawn@skostler.com; helo=mail-ua0-f169.google.com; dkim=pass header.i=@skostler-com.20150623.gappssmtp.com;", "content-type": "multipart/alternative; boundary=94eb2c11b86483e0c7054274b24a", "date": "Tue, 29 Nov 2016 11:24:21 -0700", "dkim-signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=skostler-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=G+xpR886KMNP2ZbyZwcmkbcO8EDJfFCFUAx22Rzne6U=; b=NNEUvuLBJV3zdtYefgsFaB837zfyTXGpjycHq20PDG/nYFgwhz9TXgdKowjFBxab4Q x+6U0U/4aF+G7C+uZDrHE3ijHnR1WiC6lEmGr+ZIZvTN9wcQMgskEEOIAkjR5wdLsPlU SqBpuAXR0zXiRFpATKJSzL8D0eSIytR7JwMJVQk4r/Ce54yb8nkMgxm83WCdtPwR4AQ5 I4/r20YMhCmb3lHqJ/GVZc6VZtN5alXODFfVC75s+z5h9QYjv67qIx8NSZMMMaqqwNIF +NgoUIJPfFTsUxUJ6i+EI4zRSahh1wD3hkMZHonY9NqhQ0Z4MZpJSyH5/TmMglCbpZRu 7A1g==", "from": "Shawn Ostler <shawn@skostler.com>", "in-reply-to": "<3685508-42703.1293580324@allegiancetech.com>", "message-id": "<CAFZSMw1EYFzw0Qu3abU8cddp35p8xTStnqG2_uWK8U-qs3rAKA@mail.gmail.com>", "mime-version": "1.0", "received": [ "from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169]) by inbound-smtp.us-west-2.amazonaws.com with SMTP id ano2mkhbnffd969c46esgeshdu7ell2bva7ho8g1 for mountain-america@m.skostler.com; Tue, 29 Nov 2016 18:24:23 +0000 (UTC)", "by mail-ua0-f169.google.com with SMTP id 51so187387599uai.1 for <mountain-america@m.skostler.com>; Tue, 29 Nov 2016 10:24:23 -0800 (PST)", "by 10.159.40.195 with HTTP; Tue, 29 Nov 2016 10:24:21 -0800 (PST)", ], "received-spf": "none (spfCheck: 209.85.217.169 is neither permitted nor denied by domain of skostler.com) client-ip=209.85.217.169; envelope-from=shawn@skostler.com; helo=mail-ua0-f169.google.com;", "references": "<3685508-42703.1293580324@allegiancetech.com> <3685508-42703.1293580324@allegiancetech.com>", "return-path": "<shawn@skostler.com>", "subject": "Fwd: Your feedback is vital to serving you better", "to": "mountain-america@m.skostler.com", "x-gm-message-state": "AKaTC02D3Is3qHgPH8PxK79VM14lI0UXw2Z0NvOL1Vqg0YQK02/5/gLstDMn3E9e2B50ne1d4dUJzczSJ+GCbg==", "x-google-dkim-signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=G+xpR886KMNP2ZbyZwcmkbcO8EDJfFCFUAx22Rzne6U=; b=RjKTLlgH+OiMnm2zFRBGbtNOF8FZ2Bkro94m0y1GGqG39Pu+S5oqBkXpHgIqOYljUQ J/bhGLeBgWT0JhUiJvYRPZBCgpgCLnm6X9lRwiHkWyy7kOYth5xxjCATMdC2+0KLmLWJ aakjYgoPcsnDqPDt6AlWMjpLMA9aBndjh2alnsLH4OUbRt9VjEEFwPC8BvGOkKJKYgBG w+BASbLiTv+/KnbF2UjCW1X8kxBWADqOHHeMS3c/8BmjzlQWzolzKUcIW08mvJdOidps ON/XoUWfYWJgDKuQ6zHTDslXak2NCQ20ntI/6S9PGmeMnn/l+oicblVEL+1B/yiQCSeW HvjQ==", "x-received": "by 10.176.69.149 with SMTP id u21mr21470169uau.101.1480443862175; Tue, 29 Nov 2016 10:24:22 -0800 (PST)", "x-ses-dkim-signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1480443861; h=X-SES-RECEIPT:MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; bh=lfTxH9b4skpz8/BPvMS674A8l1aYSLT+0HTGVam2HrM=; b=hdD1Tg5k2Fb8I7vgAJ5JjzoDgHAtwSQDhwNibJQi0iQXd7RAJH3pOPHWKCxTQODl dTbL4e+LtZUCFW/qkDdDn6dodCiMCgXNjrOFqCRF5IU1L3K1VFuIt/V98UCCa4vrT7R ZbkuAdM1UVb4UGfp5m4oaKzIWpIKuA6EyvW9X31E=", "x-ses-receipt": "AEFBQUFBQUFBQUFIVWhTWmVHcDE1WTFpbnh1RE1RVUpJZkYrVHIyYVE5L3R5ekcxT3pmSFV6VEJMVUZmYlBnSlg0U2VRMGFVRy9tMm1JdVZiczdWR3d6ZHpsSzIvakdGYUFKQ1JNQlBEOWdoNklGTHZrVVMrOHVhc0JPakppTERmRzg1bWVUbTA3eUNZcldLZ3F3bU5lSGtJckw2N1NkdVRuNkhZTzVCZVhUQlVmZU1WWTJhb2EyelpVYThQcnl4MG1MblJ6ZUV1cWV2NVN2cVN2STl5MXJsbFRHMVRLTG9lUHBMWDFXODc5amx4OUJ1ZSttWlhWbHQyOXpaQUQramtpb2djN01vYmpmK0NGZU1rZUFMNkFFcVhnVzZrTWs2Ug==", "x-ses-spam-verdict": "PASS", "x-ses-virus-verdict": "PASS", }, "html": "<div dir=\"ltr\"><br><div class=\"gmail_quote\">---------- Forwarded message ----------<br>From: <b class=\"gmail_sendername\">Mountain America Credit Union</b> <span dir=\"ltr\">&lt;<a href=\"mailto:surveys@macu.com\">surveys@macu.com</a>&gt;</span><br>Date: Tue, Nov 29, 2016 at 2:06 AM<br>Subject: Your feedback is vital to serving you better<br>To: Shawn Ostler &lt;<a href=\"mailto:SHAWN@skostler.com\">SHAWN@skostler.com</a>&gt;<br><br><br>\n\n\n\n<div>\n<u></u>\n\n\n\t\n\t\n\t\n\t\n\t\n\t\n\n<div bgcolor=\"#f4f4f4\" marginheight=\"0\" marginwidth=\"0\" style=\"margin:0px;padding:0px\">\n<table bgcolor=\"#f4f4f4\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" height=\"100%\" id=\"m_6199258294055211816bodyTable\" style=\"margin:0px auto;border-collapse:collapse;table-layout:fixed\" width=\"100%\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t<table align=\"center\" bgcolor=\"#f4f4f4\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"text-align:center\" width=\"100%\">\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t<table align=\"center\" bgcolor=\"#ffffff\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"m_6199258294055211816email-container\" style=\"margin:auto\" width=\"600\">\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"m_6199258294055211816hh-force-col-center\" style=\"text-align:left;padding-top:15px;background-color:rgb(255,255,255)\" valign=\"middle\"><img alt=\"MACU Logo\" border=\"0\" src=\"https://macu.allegiancetech.com/surveys/images/HKQFUS/9.19.14_macu_logo.png?cacheToken=20140919171508\"></td>\n\t\t\t\t\t\t\t\t\t<td align=\"right\" valign=\"bottom\" width=\"155\"><a href=\"https://www.facebook.com/MountainAmerica\" style=\"border:0px solid rgb(255,255,255);text-decoration:none\" target=\"_blank\"><img src=\"https://macu.allegiancetech.com/surveys/images/HKQFUS/facebook_2014.png?cacheToken=20140919171508\"></a> <a href=\"https://twitter.com/MountainAmerica\" target=\"_blank\"><img src=\"https://macu.allegiancetech.com/surveys/images/HKQFUS/twitter_2014.png?cacheToken=20140919171508\"></a> <a href=\"https://www.linkedin.com/company/mountain-america-credit-union\" target=\"_blank\"><img src=\"https://macu.allegiancetech.com/surveys/images/HKQFUS/linkedin_2014.png?cacheToken=20140919171508\"></a> <a href=\"http://www.youtube.com/user/mountainamerica\" target=\"_blank\"><img src=\"https://macu.allegiancetech.com/surveys/images/HKQFUS/youtube_2014.png?cacheToken=20140919171508\"></a> <a href=\"http://instagram.com/mountainamericacu\" title=\"\" target=\"_blank\"><img src=\"https://macu.allegiancetech.com/surveys/images/HKQFUS/in+stagram_2014.png?cacheToken=20140919171508\"></a><a href=\"http://www.youtube.com/user/mountainamerica?elq=~~eloqua..type--emailfield..syntax--recipientid~~&amp;elqCampaignId=~~eloqua..type--campaign..campaignid--0..fieldname--id~~\" style=\"border:0px solid rgb(255,255,255);text-decoration:none\" target=\"_blank\"> </a></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td height=\"10\" style=\"line-height:0;font-size:0px;background-color:rgb(255,255,255)\"> </td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t\n\n\t\t\t<table align=\"center\" bgcolor=\"#ffffff\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"m_6199258294055211816email-container\" style=\"margin:auto;border:1px solid rgb(229,229,229)\" width=\"600\">\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img alt=\"Red bar\" border=\"0\" class=\"m_6199258294055211816fluid\" height=\"23\" src=\"https://macu.allegiancetech.com/surveys/images/HKQFUS/redbar.jpg?cacheToken=20140922125859\" style=\"display:block\" width=\"600\"></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"border-bottom-color:rgb(229,229,229);border-bottom-width:1px;border-bottom-style:solid\">\n\t\t\t\t\t\t<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td style=\"padding:30px;color:rgb(68,68,68);line-height:22px;font-family:sans-serif;font-size:16px\">\n\t\t\t\t\t\t\t\t\t<h1 style=\"color:rgb(168,24,49);line-height:28px;letter-spacing:1px;font-family:Georgia,Times,serif;font-size:20px\">Your Feedback Is Needed</h1>\n\n\t\t\t\t\t\t\t\t\t<p>Dear ,Shawn</p>\n\n\t\t\t\t\t\t\t\t\t<p>We recently sent you an invitation to tell us about your online/mobile experience with Mountain America. We hope you will consider giving us your feedback.</p>\n\n\t\t\t\t\t\t\t\t\t<p>Please take a few minutes (less than 5) to complete this brief survey. Your feedback will help us as we strive to provide an excellent member experience.</p>\n\n\t\t\t\t\t\t\t\t\t<p>Click below to access the survey:</p>\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<p> </p>\n\n\t\t\t\t\t\t\t\t\t<table cellpadding=\"7\" cellspacing=\"0\" class=\"m_6199258294055211816button\">\n\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"center\" bgcolor=\"#a71930\" height=\"40\" style=\"border-radius:5px;color:rgb(255,255,255);display:block\" width=\"300\"><a href=\"https://macu.allegiancetech.com/cgi-bin/qwebcorporate.dll?idx=THYBPY&amp;rk=FG4WDE\" style=\"width:100%;line-height:40px;font-family:sans-serif;font-size:16px;font-weight:bold;text-decoration:none;display:inline-block\" target=\"_blank\"><span class=\"m_6199258294055211816uppercase\" style=\"color:rgb(255,255,255)\">Get Started </span> </a></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td align=\"center\" style=\"padding:30px;color:rgb(68,68,68);line-height:12px;font-family:sans-serif;font-size:10px;background-color:rgb(223,223,223)\">This is a Mountain America Credit Union email and is intended to share valuable information with you.<br>\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\tTo unsubscribe from these types of emails, <a href=\"https://macu.allegiancetech.com/cgi-bin/qsurveyadmin.cgi?request=exclude&amp;idx=THYBPY&amp;Data=2140242A3558EF8C26D19D49AD1B17368318FAA7498A&amp;language=English&amp;languagecharset=utf-8&amp;Source=1\" style=\"color:rgb(0,83,137)\" title=\"Unsubscribe\" target=\"_blank\">click here</a>.<br>\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t©2015 Mountain America Credit Union, 7181 S. Campus View Dr., West Jordan, UT 84084. All rights reserved.<br>\n\t\t\t\t\t\t\t\t\tEqual Housing Lender. Federally insured by NCUA up to at least $250,000.<br>\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t<p> </p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n<p><map name=\"m_6199258294055211816_Map\"><area coords=\"7,11,41,46\" href=\"https://www.facebook.com/MountainAmerica\" shape=\"rect\" target=\"_blank\"> <area coords=\"41,11,78,46\" href=\"https://twitter.com/MountainAmerica\" shape=\"rect\" target=\"_blank\"> <area coords=\"79,9,115,46\" href=\"https://www.linkedin.com/company/mountain-america-credit-union\" shape=\"rect\" target=\"_blank\"> <area coords=\"117,11,148,47\" href=\"https://www.youtube.com/user/mountainamerica\" shape=\"rect\" target=\"_blank\"> <area coords=\"150,12,187,48\" href=\"http://instagram.com/mountainamericacu/\" shape=\"rect\" target=\"_blank\"></map></p>\n</div>\n\n</div>\n\n\n</div><br></div>\n", "inReplyTo": [ "3685508-42703.1293580324@allegiancetech.com" ], "messageId": "CAFZSMw1EYFzw0Qu3abU8cddp35p8xTStnqG2_uWK8U-qs3rAKA@mail.gmail.com", "priority": "normal", "receivedDate": new Date('2016-11-29T18:24:23.000Z'), "references": [ "3685508-42703.1293580324@allegiancetech.com", "3685508-42703.1293580324@allegiancetech.com", ], "subject": "Fwd: Your feedback is vital to serving you better", "text": "---------- Forwarded message ----------\nFrom: Mountain America Credit Union <surveys@macu.com>\nDate: Tue, Nov 29, 2016 at 2:06 AM\nSubject: Your feedback is vital to serving you better\nTo: Shawn Ostler <SHAWN@skostler.com>\n\n\n[image: MACU Logo] <https://www.facebook.com/MountainAmerica>\n<https://twitter.com/MountainAmerica>\n<https://www.linkedin.com/company/mountain-america-credit-union>\n<http://www.youtube.com/user/mountainamerica>\n<http://instagram.com/mountainamericacu>\n<http://www.youtube.com/user/mountainamerica?elq=~~eloqua..type--emailfield..syntax--recipientid~~&elqCampaignId=~~eloqua..type--campaign..campaignid--0..fieldname--id~~>\n\n[image: Red bar]\nYour Feedback Is Needed\n\nDear ,Shawn\n\nWe recently sent you an invitation to tell us about your online/mobile\nexperience with Mountain America. We hope you will consider giving us your\nfeedback.\n\nPlease take a few minutes (less than 5) to complete this brief survey. Your\nfeedback will help us as we strive to provide an excellent member\nexperience.\n\nClick below to access the survey:\n\n\nGet Started\n<https://macu.allegiancetech.com/cgi-bin/qwebcorporate.dll?idx=THYBPY&rk=FG4WDE>\nThis is a Mountain America Credit Union email and is intended to share\nvaluable information with you.\n\nTo unsubscribe from these types of emails, click here\n<https://macu.allegiancetech.com/cgi-bin/qsurveyadmin.cgi?request=exclude&idx=THYBPY&Data=2140242A3558EF8C26D19D49AD1B17368318FAA7498A&language=English&languagecharset=utf-8&Source=1>\n.\n\n©2015 Mountain America Credit Union, 7181 S. Campus View Dr., West Jordan,\nUT 84084. All rights reserved.\nEqual Housing Lender. Federally insured by NCUA up to at least $250,000.\n", "to": [ { "address": "mountain-america@m.skostler.com", "name": "" } ] }; message = { content: "Return-Path: <shawn@skostler.com>\r\nReceived: from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169])\r\n by inbound-smtp.us-west-2.amazonaws.com with SMTP id ano2mkhbnffd969c46esgeshdu7ell2bva7ho8g1\r\n for mountain-america@m.skostler.com;\r\n Tue, 29 Nov 2016 18:24:23 +0000 (UTC)\r\nX-SES-Spam-Verdict: PASS\r\nX-SES-Virus-Verdict: PASS\r\nReceived-SPF: none (spfCheck: 209.85.217.169 is neither permitted nor denied by domain of skostler.com) client-ip=209.85.217.169; envelope-from=shawn@skostler.com; helo=mail-ua0-f169.google.com;\r\nAuthentication-Results: amazonses.com;\r\n spf=none (spfCheck: 209.85.217.169 is neither permitted nor denied by domain of skostler.com) client-ip=209.85.217.169; envelope-from=shawn@skostler.com; helo=mail-ua0-f169.google.com;\r\n dkim=pass header.i=@skostler-com.20150623.gappssmtp.com;\r\nX-SES-RECEIPT: AEFBQUFBQUFBQUFIVWhTWmVHcDE1WTFpbnh1RE1RVUpJZkYrVHIyYVE5L3R5ekcxT3pmSFV6VEJMVUZmYlBnSlg0U2VRMGFVRy9tMm1JdVZiczdWR3d6ZHpsSzIvakdGYUFKQ1JNQlBEOWdoNklGTHZrVVMrOHVhc0JPakppTERmRzg1bWVUbTA3eUNZcldLZ3F3bU5lSGtJckw2N1NkdVRuNkhZTzVCZVhUQlVmZU1WWTJhb2EyelpVYThQcnl4MG1MblJ6ZUV1cWV2NVN2cVN2STl5MXJsbFRHMVRLTG9lUHBMWDFXODc5amx4OUJ1ZSttWlhWbHQyOXpaQUQramtpb2djN01vYmpmK0NGZU1rZUFMNkFFcVhnVzZrTWs2Ug==\r\nX-SES-DKIM-SIGNATURE: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple;\r\n\ts=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1480443861;\r\n\th=X-SES-RECEIPT:MIME-Version:From:Date:Message-ID:Subject:To:Content-Type;\r\n\tbh=lfTxH9b4skpz8/BPvMS674A8l1aYSLT+0HTGVam2HrM=;\r\n\tb=hdD1Tg5k2Fb8I7vgAJ5JjzoDgHAtwSQDhwNibJQi0iQXd7RAJH3pOPHWKCxTQODl\r\n\tdTbL4e+LtZUCFW/qkDdDn6dodCiMCgXNjrOFqCRF5IU1L3K1VFuIt/V98UCCa4vrT7R\r\n\tZbkuAdM1UVb4UGfp5m4oaKzIWpIKuA6EyvW9X31E=\r\nReceived: by mail-ua0-f169.google.com with SMTP id 51so187387599uai.1\r\n for <mountain-america@m.skostler.com>; Tue, 29 Nov 2016 10:24:23 -0800 (PST)\r\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n d=skostler-com.20150623.gappssmtp.com; s=20150623;\r\n h=mime-version:in-reply-to:references:from:date:message-id:subject:to;\r\n bh=G+xpR886KMNP2ZbyZwcmkbcO8EDJfFCFUAx22Rzne6U=;\r\n b=NNEUvuLBJV3zdtYefgsFaB837zfyTXGpjycHq20PDG/nYFgwhz9TXgdKowjFBxab4Q\r\n x+6U0U/4aF+G7C+uZDrHE3ijHnR1WiC6lEmGr+ZIZvTN9wcQMgskEEOIAkjR5wdLsPlU\r\n SqBpuAXR0zXiRFpATKJSzL8D0eSIytR7JwMJVQk4r/Ce54yb8nkMgxm83WCdtPwR4AQ5\r\n I4/r20YMhCmb3lHqJ/GVZc6VZtN5alXODFfVC75s+z5h9QYjv67qIx8NSZMMMaqqwNIF\r\n +NgoUIJPfFTsUxUJ6i+EI4zRSahh1wD3hkMZHonY9NqhQ0Z4MZpJSyH5/TmMglCbpZRu\r\n 7A1g==\r\nX-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r\n d=1e100.net; s=20130820;\r\n h=x-gm-message-state:mime-version:in-reply-to:references:from:date\r\n :message-id:subject:to;\r\n bh=G+xpR886KMNP2ZbyZwcmkbcO8EDJfFCFUAx22Rzne6U=;\r\n b=RjKTLlgH+OiMnm2zFRBGbtNOF8FZ2Bkro94m0y1GGqG39Pu+S5oqBkXpHgIqOYljUQ\r\n J/bhGLeBgWT0JhUiJvYRPZBCgpgCLnm6X9lRwiHkWyy7kOYth5xxjCATMdC2+0KLmLWJ\r\n aakjYgoPcsnDqPDt6AlWMjpLMA9aBndjh2alnsLH4OUbRt9VjEEFwPC8BvGOkKJKYgBG\r\n w+BASbLiTv+/KnbF2UjCW1X8kxBWADqOHHeMS3c/8BmjzlQWzolzKUcIW08mvJdOidps\r\n ON/XoUWfYWJgDKuQ6zHTDslXak2NCQ20ntI/6S9PGmeMnn/l+oicblVEL+1B/yiQCSeW\r\n HvjQ==\r\nX-Gm-Message-State: AKaTC02D3Is3qHgPH8PxK79VM14lI0UXw2Z0NvOL1Vqg0YQK02/5/gLstDMn3E9e2B50ne1d4dUJzczSJ+GCbg==\r\nX-Received: by 10.176.69.149 with SMTP id u21mr21470169uau.101.1480443862175;\r\n Tue, 29 Nov 2016 10:24:22 -0800 (PST)\r\nMIME-Version: 1.0\r\nReceived: by 10.159.40.195 with HTTP; Tue, 29 Nov 2016 10:24:21 -0800 (PST)\r\nIn-Reply-To: <3685508-42703.1293580324@allegiancetech.com>\r\nReferences: <3685508-42703.1293580324@allegiancetech.com> <3685508-42703.1293580324@allegiancetech.com>\r\nFrom: Shawn Ostler <shawn@skostler.com>\r\nDate: Tue, 29 Nov 2016 11:24:21 -0700\r\nMessage-ID: <CAFZSMw1EYFzw0Qu3abU8cddp35p8xTStnqG2_uWK8U-qs3rAKA@mail.gmail.com>\r\nSubject: Fwd: Your feedback is vital to serving you better\r\nTo: mountain-america@m.skostler.com\r\nContent-Type: multipart/alternative; boundary=94eb2c11b86483e0c7054274b24a\r\n\r\n--94eb2c11b86483e0c7054274b24a\r\nContent-Type: text/plain; charset=UTF-8\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n---------- Forwarded message ----------\r\nFrom: Mountain America Credit Union <surveys@macu.com>\r\nDate: Tue, Nov 29, 2016 at 2:06 AM\r\nSubject: Your feedback is vital to serving you better\r\nTo: Shawn Ostler <SHAWN@skostler.com>\r\n\r\n\r\n[image: MACU Logo] <https://www.facebook.com/MountainAmerica>\r\n<https://twitter.com/MountainAmerica>\r\n<https://www.linkedin.com/company/mountain-america-credit-union>\r\n<http://www.youtube.com/user/mountainamerica>\r\n<http://instagram.com/mountainamericacu>\r\n<http://www.youtube.com/user/mountainamerica?elq=3D~~eloqua..type--emailfie=\r\nld..syntax--recipientid~~&elqCampaignId=3D~~eloqua..type--campaign..campaig=\r\nnid--0..fieldname--id~~>\r\n\r\n[image: Red bar]\r\nYour Feedback Is Needed\r\n\r\nDear ,Shawn\r\n\r\nWe recently sent you an invitation to tell us about your online/mobile\r\nexperience with Mountain America. We hope you will consider giving us your\r\nfeedback.\r\n\r\nPlease take a few minutes (less than 5) to complete this brief survey. Your\r\nfeedback will help us as we strive to provide an excellent member\r\nexperience.\r\n\r\nClick below to access the survey:\r\n\r\n\r\nGet Started\r\n<https://macu.allegiancetech.com/cgi-bin/qwebcorporate.dll?idx=3DTHYBPY&rk=\r\n=3DFG4WDE>\r\nThis is a Mountain America Credit Union email and is intended to share\r\nvaluable information with you.\r\n\r\nTo unsubscribe from these types of emails, click here\r\n<https://macu.allegiancetech.com/cgi-bin/qsurveyadmin.cgi?request=3Dexclude=\r\n&idx=3DTHYBPY&Data=3D2140242A3558EF8C26D19D49AD1B17368318FAA7498A&language=\r\n=3DEnglish&languagecharset=3Dutf-8&Source=3D1>\r\n.\r\n\r\n=C2=A92015 Mountain America Credit Union, 7181 S. Campus View Dr., West Jor=\r\ndan,\r\nUT 84084. All rights reserved.\r\nEqual Housing Lender. Federally insured by NCUA up to at least $250,000.\r\n\r\n--94eb2c11b86483e0c7054274b24a\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n<div dir=3D\"ltr\"><br><div class=3D\"gmail_quote\">---------- Forwarded messag=\r\ne ----------<br>From: <b class=3D\"gmail_sendername\">Mountain America Credit=\r\n Union</b> <span dir=3D\"ltr\">&lt;<a href=3D\"mailto:surveys@macu.com\">survey=\r\ns@macu.com</a>&gt;</span><br>Date: Tue, Nov 29, 2016 at 2:06 AM<br>Subject:=\r\n Your feedback is vital to serving you better<br>To: Shawn Ostler &lt;<a hr=\r\nef=3D\"mailto:SHAWN@skostler.com\">SHAWN@skostler.com</a>&gt;<br><br><br>\r\n\r\n\r\n\r\n<div>\r\n<u></u>\r\n\r\n\r\n=09\r\n=09\r\n=09\r\n=09\r\n=09\r\n=09\r\n\r\n<div bgcolor=3D\"#f4f4f4\" marginheight=3D\"0\" marginwidth=3D\"0\" style=3D\"marg=\r\nin:0px;padding:0px\">\r\n<table bgcolor=3D\"#f4f4f4\" border=3D\"0\" cellpadding=3D\"0\" cellspacing=3D\"0\"=\r\n height=3D\"100%\" id=3D\"m_6199258294055211816bodyTable\" style=3D\"margin:0px =\r\nauto;border-collapse:collapse;table-layout:fixed\" width=3D\"100%\">\r\n\t<tbody>\r\n\t\t<tr>\r\n\t\t\t<td>\r\n\t\t\t<table align=3D\"center\" bgcolor=3D\"#f4f4f4\" border=3D\"0\" cellpadding=3D\"=\r\n0\" cellspacing=3D\"0\" style=3D\"text-align:center\" width=3D\"100%\">\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<table align=3D\"center\" bgcolor=3D\"#ffffff\" border=3D\"0\" cellpadding=\r\n=3D\"0\" cellspacing=3D\"0\" class=3D\"m_6199258294055211816email-container\" sty=\r\nle=3D\"margin:auto\" width=3D\"600\">\r\n\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td class=3D\"m_6199258294055211816hh-force-col-center\" style=3D\"te=\r\nxt-align:left;padding-top:15px;background-color:rgb(255,255,255)\" valign=3D=\r\n\"middle\"><img alt=3D\"MACU Logo\" border=3D\"0\" src=3D\"https://macu.allegiance=\r\ntech.com/surveys/images/HKQFUS/9.19.14_macu_logo.png?cacheToken=3D201409191=\r\n71508\"></td>\r\n\t\t\t\t\t\t\t\t\t<td align=3D\"right\" valign=3D\"bottom\" width=3D\"155\"><a href=3D\"htt=\r\nps://www.facebook.com/MountainAmerica\" style=3D\"border:0px solid rgb(255,25=\r\n5,255);text-decoration:none\" target=3D\"_blank\"><img src=3D\"https://macu.all=\r\negiancetech.com/surveys/images/HKQFUS/facebook_2014.png?cacheToken=3D201409=\r\n19171508\"></a>=C2=A0<a href=3D\"https://twitter.com/MountainAmerica\" target=\r\n=3D\"_blank\"><img src=3D\"https://macu.allegiancetech.com/surveys/images/HKQF=\r\nUS/twitter_2014.png?cacheToken=3D20140919171508\"></a>=C2=A0<a href=3D\"https=\r\n://www.linkedin.com/company/mountain-america-credit-union\" target=3D\"_blank=\r\n\"><img src=3D\"https://macu.allegiancetech.com/surveys/images/HKQFUS/linkedi=\r\nn_2014.png?cacheToken=3D20140919171508\"></a>=C2=A0<a href=3D\"http://www.you=\r\ntube.com/user/mountainamerica\" target=3D\"_blank\"><img src=3D\"https://macu.a=\r\nllegiancetech.com/surveys/images/HKQFUS/youtube_2014.png?cacheToken=3D20140=\r\n919171508\"></a>=C2=A0<a href=3D\"http://instagram.com/mountainamericacu\" tit=\r\nle=3D\"\" target=3D\"_blank\"><img src=3D\"https://macu.allegiancetech.com/surve=\r\nys/images/HKQFUS/in+stagram_2014.png?cacheToken=3D20140919171508\"></a><a hr=\r\nef=3D\"http://www.youtube.com/user/mountainamerica?elq=3D~~eloqua..type--ema=\r\nilfield..syntax--recipientid~~&amp;elqCampaignId=3D~~eloqua..type--campaign=\r\n..campaignid--0..fieldname--id~~\" style=3D\"border:0px solid rgb(255,255,255=\r\n);text-decoration:none\" target=3D\"_blank\">=C2=A0</a></td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td height=3D\"10\" style=3D\"line-height:0;font-size:0px;background-=\r\ncolor:rgb(255,255,255)\">=C2=A0</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t=09\r\n\r\n\t\t\t<table align=3D\"center\" bgcolor=3D\"#ffffff\" border=3D\"0\" cellpadding=3D\"=\r\n0\" cellspacing=3D\"0\" class=3D\"m_6199258294055211816email-container\" style=\r\n=3D\"margin:auto;border:1px solid rgb(229,229,229)\" width=3D\"600\">\r\n\t\t\t\t<tbody>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td><img alt=3D\"Red bar\" border=3D\"0\" class=3D\"m_6199258294055211816f=\r\nluid\" height=3D\"23\" src=3D\"https://macu.allegiancetech.com/surveys/images/H=\r\nKQFUS/redbar.jpg?cacheToken=3D20140922125859\" style=3D\"display:block\" width=\r\n=3D\"600\"></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t=09\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td style=3D\"border-bottom-color:rgb(229,229,229);border-bottom-width=\r\n:1px;border-bottom-style:solid\">\r\n\t\t\t\t\t\t<table align=3D\"center\" border=3D\"0\" cellpadding=3D\"0\" cellspacing=3D=\r\n\"0\" width=3D\"100%\">\r\n\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td style=3D\"padding:30px;color:rgb(68,68,68);line-height:22px;fon=\r\nt-family:sans-serif;font-size:16px\">\r\n\t\t\t\t\t\t\t\t\t<h1 style=3D\"color:rgb(168,24,49);line-height:28px;letter-spacing:=\r\n1px;font-family:Georgia,Times,serif;font-size:20px\">Your Feedback Is Needed=\r\n</h1>\r\n\r\n\t\t\t\t\t\t\t\t\t<p>Dear ,Shawn</p>\r\n\r\n\t\t\t\t\t\t\t\t\t<p>We recently sent you an invitation to tell us about your=C2=A0o=\r\nnline/mobile experience with=C2=A0Mountain America. We hope you will consid=\r\ner giving us your feedback.</p>\r\n\r\n\t\t\t\t\t\t\t\t\t<p>Please take a few minutes (less than 5) to complete this brief =\r\nsurvey. Your feedback will help us as we strive to provide an excellent mem=\r\nber experience.</p>\r\n\r\n\t\t\t\t\t\t\t\t\t<p>Click below to access the survey:</p>\r\n\t\t\t\t\t\t\t\t\t<br>\r\n\t\t\t\t\t\t\t\t=09\r\n\t\t\t\t\t\t\t\t\t<p>=C2=A0</p>\r\n\r\n\t\t\t\t\t\t\t\t\t<table cellpadding=3D\"7\" cellspacing=3D\"0\" class=3D\"m_619925829405=\r\n5211816button\">\r\n\t\t\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td align=3D\"center\" bgcolor=3D\"#a71930\" height=3D\"40\" style=3D=\r\n\"border-radius:5px;color:rgb(255,255,255);display:block\" width=3D\"300\"><a h=\r\nref=3D\"https://macu.allegiancetech.com/cgi-bin/qwebcorporate.dll?idx=3DTHYB=\r\nPY&amp;rk=3DFG4WDE\" style=3D\"width:100%;line-height:40px;font-family:sans-s=\r\nerif;font-size:16px;font-weight:bold;text-decoration:none;display:inline-bl=\r\nock\" target=3D\"_blank\"><span class=3D\"m_6199258294055211816uppercase\" style=\r\n=3D\"color:rgb(255,255,255)\">Get Started </span> </a></td>\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td align=3D\"center\" style=3D\"padding:30px;color:rgb(68,68,68);lin=\r\ne-height:12px;font-family:sans-serif;font-size:10px;background-color:rgb(22=\r\n3,223,223)\">This is a Mountain America Credit Union email and is intended t=\r\no share valuable information with you.<br>\r\n\t\t\t\t\t\t\t\t\t<br>\r\n\t\t\t\t\t\t\t\t\tTo unsubscribe from these types of emails, <a href=3D\"https://macu=\r\n.allegiancetech.com/cgi-bin/qsurveyadmin.cgi?request=3Dexclude&amp;idx=3DTH=\r\nYBPY&amp;Data=3D2140242A3558EF8C26D19D49AD1B17368318FAA7498A&amp;language=\r\n=3DEnglish&amp;languagecharset=3Dutf-8&amp;Source=3D1\" style=3D\"color:rgb(0=\r\n,83,137)\" title=3D\"Unsubscribe\" target=3D\"_blank\">click here</a>.<br>\r\n\t\t\t\t\t\t\t\t\t<br>\r\n\t\t\t\t\t\t\t\t\t=C2=A92015 Mountain America Credit Union, 7181 S. Campus View Dr.,=\r\n West Jordan, UT 84084. All rights reserved.<br>\r\n\t\t\t\t\t\t\t\t\tEqual Housing Lender. Federally insured by NCUA up to at least $25=\r\n0,000.<br>\r\n\t\t\t\t\t\t\t\t\t=C2=A0\r\n\t\t\t\t\t\t\t\t\t<p>=C2=A0</p>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t=09\r\n\t\t\t\t</tbody>\r\n\t\t\t</table>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n\r\n<p><map name=3D\"m_6199258294055211816_Map\"><area coords=3D\"7,11,41,46\" href=\r\n=3D\"https://www.facebook.com/MountainAmerica\" shape=3D\"rect\" target=3D\"_bla=\r\nnk\"> <area coords=3D\"41,11,78,46\" href=3D\"https://twitter.com/MountainAmeri=\r\nca\" shape=3D\"rect\" target=3D\"_blank\"> <area coords=3D\"79,9,115,46\" href=3D\"=\r\nhttps://www.linkedin.com/company/mountain-america-credit-union\" shape=3D\"re=\r\nct\" target=3D\"_blank\"> <area coords=3D\"117,11,148,47\" href=3D\"https://www.y=\r\noutube.com/user/mountainamerica\" shape=3D\"rect\" target=3D\"_blank\"> <area co=\r\nords=3D\"150,12,187,48\" href=3D\"http://instagram.com/mountainamericacu/\" sha=\r\npe=3D\"rect\" target=3D\"_blank\"></map></p>\r\n</div>\r\n\r\n</div>\r\n\r\n\r\n</div><br></div>\r\n\r\n--94eb2c11b86483e0c7054274b24a--\r\n", mail: { "timestamp": "2016-11-29T18:24:23.344Z", "source": "shawn@skostler.com", "messageId": "ano2mkhbnffd969c46esgeshdu7ell2bva7ho8g1", "destination": [ "mountain-america@m.skostler.com" ], "headersTruncated": false, "headers": [ { "name": "Return-Path", "value": "<shawn@skostler.com>" }, { "name": "Received", "value": "from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169]) by inbound-smtp.us-west-2.amazonaws.com with SMTP id ano2mkhbnffd969c46esgeshdu7ell2bva7ho8g1 for mountain-america@m.skostler.com; Tue, 29 Nov 2016 18:24:23 +0000 (UTC)" }, { "name": "X-SES-Spam-Verdict", "value": "PASS" }, { "name": "X-SES-Virus-Verdict", "value": "PASS" }, { "name": "Received-SPF", "value": "none (spfCheck: 209.85.217.169 is neither permitted nor denied by domain of skostler.com) client-ip=209.85.217.169; envelope-from=shawn@skostler.com; helo=mail-ua0-f169.google.com;" }, { "name": "Authentication-Results", "value": "amazonses.com; spf=none (spfCheck: 209.85.217.169 is neither permitted nor denied by domain of skostler.com) client-ip=209.85.217.169; envelope-from=shawn@skostler.com; helo=mail-ua0-f169.google.com; dkim=pass header.i=@skostler-com.20150623.gappssmtp.com;" }, { "name": "X-SES-RECEIPT", "value": "AEFBQUFBQUFBQUFIVWhTWmVHcDE1WTFpbnh1RE1RVUpJZkYrVHIyYVE5L3R5ekcxT3pmSFV6VEJMVUZmYlBnSlg0U2VRMGFVRy9tMm1JdVZiczdWR3d6ZHpsSzIvakdGYUFKQ1JNQlBEOWdoNklGTHZrVVMrOHVhc0JPakppTERmRzg1bWVUbTA3eUNZcldLZ3F3bU5lSGtJckw2N1NkdVRuNkhZTzVCZVhUQlVmZU1WWTJhb2EyelpVYThQcnl4MG1MblJ6ZUV1cWV2NVN2cVN2STl5MXJsbFRHMVRLTG9lUHBMWDFXODc5amx4OUJ1ZSttWlhWbHQyOXpaQUQramtpb2djN01vYmpmK0NGZU1rZUFMNkFFcVhnVzZrTWs2Ug==" }, { "name": "X-SES-DKIM-SIGNATURE", "value": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1480443861; h=X-SES-RECEIPT:MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; bh=lfTxH9b4skpz8/BPvMS674A8l1aYSLT+0HTGVam2HrM=; b=hdD1Tg5k2Fb8I7vgAJ5JjzoDgHAtwSQDhwNibJQi0iQXd7RAJH3pOPHWKCxTQODl dTbL4e+LtZUCFW/qkDdDn6dodCiMCgXNjrOFqCRF5IU1L3K1VFuIt/V98UCCa4vrT7R ZbkuAdM1UVb4UGfp5m4oaKzIWpIKuA6EyvW9X31E=" }, { "name": "Received", "value": "by mail-ua0-f169.google.com with SMTP id 51so187387599uai.1 for <mountain-america@m.skostler.com>; Tue, 29 Nov 2016 10:24:23 -0800 (PST)" }, { "name": "DKIM-Signature", "value": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=skostler-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=G+xpR886KMNP2ZbyZwcmkbcO8EDJfFCFUAx22Rzne6U=; b=NNEUvuLBJV3zdtYefgsFaB837zfyTXGpjycHq20PDG/nYFgwhz9TXgdKowjFBxab4Qx+6U0U/4aF+G7C+uZDrHE3ijHnR1WiC6lEmGr+ZIZvTN9wcQMgskEEOIAkjR5wdLsPlUSqBpuAXR0zXiRFpATKJSzL8D0eSIytR7JwMJVQk4r/Ce54yb8nkMgxm83WCdtPwR4AQ5I4/r20YMhCmb3lHqJ/GVZc6VZtN5alXODFfVC75s+z5h9QYjv67qIx8NSZMMMaqqwNIF+NgoUIJPfFTsUxUJ6i+EI4zRSahh1wD3hkMZHonY9NqhQ0Z4MZpJSyH5/TmMglCbpZRu7A1g==" }, { "name": "X-Google-DKIM-Signature", "value": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=G+xpR886KMNP2ZbyZwcmkbcO8EDJfFCFUAx22Rzne6U=; b=RjKTLlgH+OiMnm2zFRBGbtNOF8FZ2Bkro94m0y1GGqG39Pu+S5oqBkXpHgIqOYljUQ J/bhGLeBgWT0JhUiJvYRPZBCgpgCLnm6X9lRwiHkWyy7kOYth5xxjCATMdC2+0KLmLWJ aakjYgoPcsnDqPDt6AlWMjpLMA9aBndjh2alnsLH4OUbRt9VjEEFwPC8BvGOkKJKYgBG w+BASbLiTv+/KnbF2UjCW1X8kxBWADqOHHeMS3c/8BmjzlQWzolzKUcIW08mvJdOidps ON/XoUWfYWJgDKuQ6zHTDslXak2NCQ20ntI/6S9PGmeMnn/l+oicblVEL+1B/yiQCSeW HvjQ==" }, { "name": "X-Gm-Message-State", "value": "AKaTC02D3Is3qHgPH8PxK79VM14lI0UXw2Z0NvOL1Vqg0YQK02/5/gLstDMn3E9e2B50ne1d4dUJzczSJ+GCbg==" }, { "name": "X-Received", "value": "by 10.176.69.149 with SMTP id u21mr21470169uau.101.1480443862175; Tue, 29 Nov 2016 10:24:22 -0800 (PST)" }, { "name": "MIME-Version", "value": "1.0" }, { "name": "Received", "value": "by 10.159.40.195 with HTTP; Tue, 29 Nov 2016 10:24:21 -0800 (PST)" }, { "name": "In-Reply-To", "value": "<3685508-42703.1293580324@allegiancetech.com>" }, { "name": "References", "value": "<3685508-42703.1293580324@allegiancetech.com> <3685508-42703.1293580324@allegiancetech.com>" }, { "name": "From", "value": "Shawn Ostler <shawn@skostler.com>" }, { "name": "Date", "value": "Tue, 29 Nov 2016 11:24:21 -0700" }, { "name": "Message-ID", "value": "<CAFZSMw1EYFzw0Qu3abU8cddp35p8xTStnqG2_uWK8U-qs3rAKA@mail.gmail.com>" }, { "name": "Subject", "value": "Fwd: Your feedback is vital to serving you better" }, { "name": "To", "value": "mountain-america@m.skostler.com" }, { "name": "Content-Type", "value": "multipart/alternative; boundary=94eb2c11b86483e0c7054274b24a" } ], "commonHeaders": { "returnPath": "shawn@skostler.com", "from": [ "Shawn Ostler <shawn@skostler.com>" ], "date": "Tue, 29 Nov 2016 11:24:21 -0700", "to": [ "mountain-america@m.skostler.com" ], "messageId": "<CAFZSMw1EYFzw0Qu3abU8cddp35p8xTStnqG2_uWK8U-qs3rAKA@mail.gmail.com>", "subject": "Fwd: Your feedback is vital to serving you better" } }, notificationType: 'Received', receipt: { action: { encoding: "UTF8", topicArn: "arn:aws:sns:us-west-2:725184476523:m-skostler-com-email-delivery", type: "SNS" }, "dkimVerdict": { "status": "GRAY" }, "processingTimeMillis": 718, "recipients": [ "mountain-america@m.skostler.com" ], "spamVerdict": { "status": "PASS" }, "spfVerdict": { "status": "GRAY" }, "timestamp": "2016-11-29T18:24:23.344Z", "virusVerdict": { "status": "PASS" } } }; event = require('./example-event.json'); }); it('should', function (done) { var context = { fail: done, succeed: function (result) { try { Expect(result).to.equal(expected, 'result'); mock.done(done); } catch (exception) { done(exception); } } }; mock.mock(lambda).expect('handleEmail') .with(message, content) .willResolve(expected); lambda.handler(event, context); }); it('should catch exception', function (done) { var context = { succeed: done, fail: function (result) { try { Expect(result).to.equal(expected, 'result'); mock.done(done); } catch (exception) { done(exception); } } }; mock.mock(lambda).expect('handleEmail') .with(message, content) .willReject(expected); lambda.handler(event, context); }); }); describe('register', function() { it('should', function () { var emailAddress = 'email@address.com', expected = 'expected'; lambda.register(emailAddress, expected); Expect(lambda.handlers[emailAddress]).to.equal(expected, 'handler'); }); }); });