{"_id":"hof-behaviour-emailer","_rev":"72-ab7bf59f87e508950ad74433b67c4691","name":"hof-behaviour-emailer","dist-tags":{"latest":"2.2.1"},"versions":{"1.0.0":{"name":"hof-behaviour-emailer","version":"1.0.0","keywords":["hof","hof-behaviour"],"author":{"name":"Leonard Martin","email":"hello@lennym.co.uk"},"license":"MIT","_id":"hof-behaviour-emailer@1.0.0","maintainers":[{"name":"lennym","email":"leonard.martin@gmail.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer/issues"},"dist":{"shasum":"e8c1fad1874f577ab1582157ae8fb5e071ba03ed","tarball":"https://registry.npmjs.org/hof-behaviour-emailer/-/hof-behaviour-emailer-1.0.0.tgz","integrity":"sha512-5Rx2lX/yK3ZtStoO9bsMcCJeIRBExaSfiigu8+C8SCyeRQMBqhg82RIV9wZIXLxitOKsHaz1pXwVD/bfWqgTDA==","signatures":[{"sig":"MEUCIQDpH25dVnPpimsEz77isOdGPynq8Btx/NqGCoUgbbGraQIgJenrJ2/qne0LlPIvPCFb20w8xfLuv5Nvd2rAXH/Q9kg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"e8c1fad1874f577ab1582157ae8fb5e071ba03ed","gitHead":"3cc12273dd549f29a26d88d74ae50fc6c7433404","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha","test:unit:cover":"istanbul cover _mocha"},"_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"deprecated":"hof-behaviour-emailer has been added directly into hof v19.0.1 <(^_^)> and should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-behaviour-emailer.git","type":"git"},"_npmVersion":"4.1.2","description":"HOF behaviour to send emails","directories":{},"_nodeVersion":"6.10.0","dependencies":{"debug":"^2.6.1","hogan.js":"^3.0.2","hof-emailer":"^2.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.17.1","istanbul":"^0.4.5","sinon-chai":"^2.8.0","mocha-sandbox":"^1.0.0","hof-util-reqres":"^1.0.0","eslint-config-homeoffice":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/hof-behaviour-emailer-1.0.0.tgz_1490351601547_0.7664940278045833","host":"packages-12-west.internal.npmjs.com"}},"2.0.0":{"name":"hof-behaviour-emailer","version":"2.0.0","keywords":["hof","hof-behaviour"],"author":{"name":"Leonard Martin","email":"hello@lennym.co.uk"},"license":"MIT","_id":"hof-behaviour-emailer@2.0.0","maintainers":[{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"josephchapman","email":"info@josephchapman.com"},{"name":"lennym","email":"leonard.martin@gmail.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer/issues"},"dist":{"shasum":"a7cff2ae6a9546e380e1251b11eca1b94acc63a1","tarball":"https://registry.npmjs.org/hof-behaviour-emailer/-/hof-behaviour-emailer-2.0.0.tgz","integrity":"sha512-FusPnfMHD7mgEYh3H9q+y6mEFt+AAwJ0eqk8LAN67A2NU2ZQ0vqMQD+XDyQNMxfethAH+OuBp1IYuLbqErSu/g==","signatures":[{"sig":"MEQCIEkOy/Dx9FzeYlWB+hGYAXq/qan4O4x/EwTrzn1YR8VLAiAtgKVE0l8WzPchzO1/VrvsZT8vMxTOx0xyMHxUBaMzhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"a7cff2ae6a9546e380e1251b11eca1b94acc63a1","gitHead":"d7da15e1297ffcba1f55ec5fd25c4c05d5050bec","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha","test:unit:cover":"istanbul cover _mocha"},"_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"deprecated":"hof-behaviour-emailer has been added directly into hof v19.0.1 <(^_^)> and should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-behaviour-emailer.git","type":"git"},"_npmVersion":"4.4.1","description":"HOF behaviour to send emails","directories":{},"_nodeVersion":"6.10.0","dependencies":{"debug":"^2.6.1","hogan.js":"^3.0.2","hof-emailer":"^2.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.17.1","istanbul":"^0.4.5","sinon-chai":"^2.8.0","mocha-sandbox":"^1.0.0","hof-util-reqres":"^1.0.0","eslint-config-homeoffice":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/hof-behaviour-emailer-2.0.0.tgz_1490360656963_0.43423624732531607","host":"packages-18-east.internal.npmjs.com"}},"2.1.0":{"name":"hof-behaviour-emailer","version":"2.1.0","keywords":["hof","hof-behaviour"],"author":{"name":"Leonard Martin","email":"hello@lennym.co.uk"},"license":"MIT","_id":"hof-behaviour-emailer@2.1.0","maintainers":[{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"joefitter","email":"hello@joefitter.com"},{"name":"josephchapman","email":"info@josephchapman.com"},{"name":"easternbloc","email":"ben@marvell-consulting.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer/issues"},"dist":{"shasum":"0e29663c95cb8de3235e2d292f044864fcacfeb0","tarball":"https://registry.npmjs.org/hof-behaviour-emailer/-/hof-behaviour-emailer-2.1.0.tgz","integrity":"sha512-m7ep9DlDYgo94Gp3zj6t/rBDkgGDRbAz3AtBK19JCwwpv79ImMpVuzBcAt9JKsFIpLFsBHxEjsgff+M8X1Z3MQ==","signatures":[{"sig":"MEUCIQDByANVYw11yCrRRj7MZinn7b+EUUqFgc+KJOadOhmupgIgEn73Sy1MrwbRDiVdYzvo2HDABd8qPGs9YeuoNYyYLO4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","gitHead":"0c6e98d4f3bd91df541c0bcef500e6c64a1e226c","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha","test:unit:cover":"istanbul cover _mocha"},"_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"deprecated":"hof-behaviour-emailer has been added directly into hof v19.0.1 <(^_^)> and should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-behaviour-emailer.git","type":"git"},"_npmVersion":"5.4.2","description":"HOF behaviour to send emails","directories":{},"_nodeVersion":"8.8.1","dependencies":{"debug":"^2.6.1","hogan.js":"^3.0.2","hof-emailer":"^2.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.17.1","istanbul":"^0.4.5","sinon-chai":"^2.8.0","mocha-sandbox":"^1.0.0","hof-util-reqres":"^1.0.0","eslint-config-homeoffice":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/hof-behaviour-emailer-2.1.0.tgz_1509122767820_0.900184104219079","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"hof-behaviour-emailer","version":"2.2.0","keywords":["hof","hof-behaviour"],"author":{"name":"Leonard Martin","email":"hello@lennym.co.uk"},"license":"MIT","_id":"hof-behaviour-emailer@2.2.0","maintainers":[{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"joefitter","email":"hello@joefitter.com"},{"name":"josephchapman","email":"info@josephchapman.com"},{"name":"easternbloc","email":"ben@marvell-consulting.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer/issues"},"dist":{"shasum":"9279f2afdbd56c8b5893ab1d3395a4c2fbf38ac5","tarball":"https://registry.npmjs.org/hof-behaviour-emailer/-/hof-behaviour-emailer-2.2.0.tgz","integrity":"sha512-Bk4hXH/eN85D0WuPlXhj9wUCyz7Q6RS6TwTfmc5VbubQMBy+5Rxp4n6YR/HMYug3mNflE34V7P0i7FAS8UdGjg==","signatures":[{"sig":"MEUCIQCg5D0qtbfTVjeOBAl+zQbvTO24dKdlwmr6/q1xgF4y7AIgSenVIp46km5klFYY2xv6F3qSREvh7WlOtvcsYBBDW+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","gitHead":"1875da34c91533e160903b431cd84f01d09bec99","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha","test:unit:cover":"istanbul cover _mocha"},"_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"deprecated":"hof-behaviour-emailer has been added directly into hof v19.0.1 <(^_^)> and should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-behaviour-emailer.git","type":"git"},"_npmVersion":"5.4.2","description":"HOF behaviour to send emails","directories":{},"_nodeVersion":"8.8.1","dependencies":{"debug":"^2.6.1","hogan.js":"^3.0.2","hof-emailer":"^2.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.17.1","istanbul":"^0.4.5","sinon-chai":"^2.8.0","mocha-sandbox":"^1.0.0","hof-util-reqres":"^1.0.0","eslint-config-homeoffice":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/hof-behaviour-emailer-2.2.0.tgz_1509446123881_0.3760123385582119","host":"s3://npm-registry-packages"}},"2.2.1":{"name":"hof-behaviour-emailer","version":"2.2.1","keywords":["hof","hof-behaviour"],"author":{"name":"Leonard Martin","email":"hello@lennym.co.uk"},"license":"MIT","_id":"hof-behaviour-emailer@2.2.1","maintainers":[{"name":"mohameduwais","email":"mohamed.uwais@digital.homeoffice.gov.uk"},{"name":"cmedland","email":"christopher.medland@digital.homeoffice.gov.uk"},{"name":"maxosully","email":"max.osullivan@digital.homeoffice.gov.uk"},{"name":"sarahjaneluff","email":"Sarah-Jane.Luff@digital.homeoffice.gov.uk"},{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"josephchapman","email":"joe@creatify.io"},{"name":"joefitter","email":"hello@joefitter.com"},{"name":"coupey","email":"paul@coupey.co.uk"},{"name":"sulthan-ahmed","email":"sulthanahmeduk@gmail.com"},{"name":"andrew.moody.ho","email":"andrew.moody@digital.homeoffice.gov.uk"},{"name":"alexfranklin","email":"alex.franklin@digital.homeoffice.gov.uk"},{"name":"aswann","email":"alex_swann@hotmail.co.uk"},{"name":"robertdeniszczyc2","email":"Robert.deniszczyc@digital.homeoffice.gov.uk"},{"name":"agraham19","email":"andrew.graham@digital.homeoffice.gov.uk"},{"name":"aaron.robinson","email":"aaron.robinson@digital.homeoffice.gov.uk"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer/issues"},"dist":{"shasum":"f35b54232b85a0f080edb6b54bf9ed26d5f2659d","tarball":"https://registry.npmjs.org/hof-behaviour-emailer/-/hof-behaviour-emailer-2.2.1.tgz","fileCount":15,"integrity":"sha512-FCMbeiwlFvZX3/KC1cvpEe/tE4zTo4/b8mWoU69E0McT+mPBAW5onnRUDyB4lruPSdDFE6WDjrMAtSn8UhL2YQ==","signatures":[{"sig":"MEQCIBzja++HbfFvoMW+CPV43gjHc5isb3+rRJLRsyzA5HxaAiBmiGBay59UpawNimZdni1E+tFUlY4qMvlHZMM9WGcMng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnkbcCRA9TVsSAnZWagAA/Q4P+wRsVqWbN0KU2aiNWI+6\nGa0vJnSqRSFdTlgQ9d0J5SYLgeb5pH0O+PAcmnnvReWsB0cb8/LJPzTf79hE\nZgE0Hn3FzdfImDpBpkGBIBtHpKHK1gI/Vtp+8qHJ4duZ7aqllU1i8R5LaCFd\nE9ElrNZxPi5AA+XUiLVXzV93+KpJZPkLbEsnBWb4Y+/or14rJXKmE6lf0wjv\n/SGllQfDTUt8fHJDHYu8t16JegfWb/WMaOloO9pwGOwMDMcLKpZeBAHN/Mi/\nKevsQx414K2U0Sl1iwgUPzDLvSXf/r4HjLwrAdhyWTKDpoInLJ9yAZdj+k3U\nitdkEfaFM5GFbKFeKz5ueLLqVgdDXwu++B0NFR++zcFDkV6tn3w6ypBtFvco\n/45vdjxau0Tusd2rKd6/6o9Xerqo6Zw7WgmIkNxZJFxNtXn/a7rG3v30CnCC\nBqb3YtzJSwWbB6h/iuzn3IiHdxy2CM6/nGRQU+G6/Jz436xWvPODcUfGv27Q\nuiT7Ib7uZPM/GWxSXyNUSIpwv1WnXDKl2RGzaiTGrLi4Uqu8rvtQd/joh9MS\nDrBzMz+5vCh8l+jDG78qCV3EpDpJtD+SZ++yKle4ZRqi/J1SLnBeGwD5o4Ij\ntdOePqET59C0rgOhd4whArXmj4WYTD+eoi86KgVe8IJ505oULfhclvb+qm28\n/GFb\r\n=CrYg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"499944ea97a56efd984ee21e713c3dae09b87f42","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha","test:unit:cover":"istanbul cover _mocha"},"_npmUser":{"name":"sarahjaneluff","email":"Sarah-Jane.Luff@digital.homeoffice.gov.uk"},"deprecated":"hof-behaviour-emailer has been added directly into hof v19.0.1 <(^_^)> and should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-behaviour-emailer.git","type":"git"},"_npmVersion":"6.14.11","description":"HOF behaviour to send emails","directories":{},"_nodeVersion":"10.24.0","dependencies":{"debug":"^2.6.1","hogan.js":"^3.0.2","hof-emailer":"^2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.17.1","istanbul":"^0.4.5","sinon-chai":"^2.8.0","mocha-sandbox":"^1.0.0","hof-util-reqres":"^1.0.0","eslint-config-homeoffice":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/hof-behaviour-emailer_2.2.1_1620985563996_0.29319535709689726","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-03-24T10:33:26.308Z","modified":"2026-09-21T15:12:44.562Z","1.0.0":"2017-03-24T10:33:26.308Z","2.0.0":"2017-03-24T13:04:17.941Z","2.1.0":"2017-10-27T16:46:09.087Z","2.2.0":"2017-10-31T10:35:24.697Z","2.2.1":"2021-05-14T09:46:04.110Z"},"bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer/issues"},"author":{"name":"Leonard Martin","email":"hello@lennym.co.uk"},"license":"MIT","homepage":"https://github.com/UKHomeOfficeForms/hof-behaviour-emailer#readme","keywords":["hof","hof-behaviour"],"repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-behaviour-emailer.git","type":"git"},"description":"HOF behaviour to send emails","maintainers":[{"email":"aaron.russell@digital.homeoffice.gov.uk","name":"aaronrussellho"},{"email":"sas-hof-test@digital.homeoffice.gov.uk","name":"hof-bot-user"},{"email":"dk4g.blob@gmail.com","name":"dk4g"},{"email":"gregory.wolverson@digital.homeoffice.gov.uk","name":"greg_wolverson_ho"},{"email":"vinodha.samiyappan@digital.homeoffice.gov.uk","name":"vinodha.s"},{"email":"megan.john@digital.homeoffice.gov.uk","name":"meganjohn"},{"email":"nese.zorba@digital.homeoffice.gov.uk","name":"nzorba"},{"email":"rayhannur.rohman@digital.homeoffice.gov.uk","name":"rayhannurrohmanho"},{"email":"vivek.kumar1@digital.homeoffice.gov.uk","name":"vivekkumar-ho"},{"email":"leonard.martin@gmail.com","name":"lennym"}],"readme":"# hof-behaviour-emailer\nHOF behaviour to send emails\n\n## Usage\n\n```js\nconst EmailBehaviour = require('hof-behaviour-emailer');\n\n// configure email behaviour\nconst emailer = EmailBehaviour({\n  transport: 'ses',\n  transportOptions: {\n    accessKeyId: '...',\n    secretAccessKey: '...'\n  },\n  template: path.resolve(__dirname, './views/emails/confirm.html'),\n  from: 'confirmation@homeoffice.gov.uk',\n  recipient: 'customer-email',\n  subject: 'Application Successful'\n});\n\n// in steps config\nsteps: {\n  ...\n  '/confirm': {\n    behaviours: ['complete', emailer],\n    next: '/confirmation',\n    ...\n  },\n  ...\n}\n```\n\n## Options\n\nIn addition to the options passed to `hof-emailer`, the following options can be used:\n\n* `recipient` - _Required_ - defines the address to which email will be sent. This can be set either as a key to retrieve an email address from the session, or explicitly to an email address.\n* `template` - _Required_ - defines the mustache template used to render the email content.\n* `subject` - defines the subject line of the email.\n* `parse` - parses the session model into an object used to populate the template.\n\n`recipient` and `subject` options can also be defined as functions, which will be passed a copy of the session model and a translation function as arguments, and should return a string value.\n\n```js\n// use a translated value for the email subject line\nconst emailer = EmailBehaviour({\n  // ...\n  subject: (model, translate) => translate('email.success.subject')\n});\n```\n","readmeFilename":"README.md"}