This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Free/Pre-paid/Affiliate Offers: Refactor + styling](https://www.pivotaltracker.com/story/show/77107932) | |
* ASH: | |
* ANDREW: | |
* JEFF: | |
* MATT: | |
* SAM: | |
* VERN: | |
[Offer Details: Jump to tag - interaction](https://www.pivotaltracker.com/story/show/75437024) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Failure: | |
test: .send_initial_reminder! should deliver mailer, log email and update basket columns (within a transaction). (ShoppingBaskets::AbandonmentTest) [/Users/DigitalMarketing/Documents/Development/merchant-portal/test/unit/shopping_baskets/abandonment_test.rb:105]: | |
:last_reminder_sent_at should be updated. | |
<-62167222800> expected but was | |
<0>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Expects the following modules to be installed: | |
// npm install --save babel-core babel-preset-es2015 babelify browserify gulp gulp-concat gulp-eslint gulp-rename gulp-watch gulp-minifier gulp-sass vinyl-buffer vinyl-source-stream | |
import gulp from 'gulp'; | |
import watch from 'gulp-watch'; | |
import concat from 'gulp-concat'; | |
import rename from 'gulp-rename'; | |
import sass from 'gulp-sass'; | |
import minify from 'gulp-minifier'; | |
import browserify from 'browserify'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle.js?c867:4048 Uncaught ReferenceError: regeneratorRuntime is not defined | |
at eval (bundle.js?c867:4048) | |
at Object.eval (bundle.js?c867:4097) | |
at __webpack_require__ (bundle.js?c867:30) | |
at Object.eval (bundle.js?c867:1531) | |
at __webpack_require__ (bundle.js?c867:30) | |
at eval (bundle.js?c867:73) | |
at eval (bundle.js?c867:76) | |
at webpackUniversalModuleDefinition (bundle.js?c867:3) | |
at eval (bundle.js?c867:10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); // Load the SDK for JavaScript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const htmlTemplate = (data) => { | |
return ` | |
<p><strong>Name:</strong> ${data.name}</p> | |
<p><strong>Email:</strong> <a href="mailto:${data.email}">${data.email}</a></p> | |
<p><strong>Message:</strong> ${data.message}</p> | |
`; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports.sendMail = (sender, receivers, data) => { | |
const params = { | |
Destination: { | |
ToAddresses: receivers | |
}, | |
Message: { | |
Subject: { | |
Charset: 'UTF-8', | |
Data: 'Website Enquiry' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); // Load the SDK for JavaScript | |
const mailer = require("./mailer"); | |
const express = require('express'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = express(); | |
const port = process.env.PORT || 5000; | |
AWS.config.update({region: 'eu-west-1'}); // Set the region that you configured in AWS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Our end-point for handling the enquiry request | |
app.post('/api/contact', (req, res, next) => { | |
return mailer.sendMail('sender@email.com', ['reciever@email.com'], req.body) | |
.then(() => res.send(req.body)) | |
.catch(next); | |
}); | |
app.listen(port, () => console.log(`Listening on port ${port}`)); |
OlderNewer