-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from kevinejohn/master
[FEATURE] Added plain text in verification email
- Loading branch information
Showing
2 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,21 +2,22 @@ var hyperglue = require('hyperglue'); | |
var config = require('../config'); | ||
var fs = require('fs'); | ||
var contents = fs.readFileSync(__dirname+ '/email.html'); | ||
var contents_txt = fs.readFileSync(__dirname+ '/email.txt', 'utf8'); | ||
var email = require('emailjs'); | ||
var server = email.server.connect({ | ||
user: config.email.user, | ||
password:config.email.password, | ||
host: config.email.host, | ||
user: config.email.user, | ||
password:config.email.password, | ||
host: config.email.host, | ||
ssl: true | ||
}); | ||
var generateMessage = function(email,token,name,hostlink) { | ||
var message = { | ||
text: "Welcome to RippleTrade! Verify your email", | ||
from: "you <[email protected]>", | ||
text: contents_txt.replace('_VERIFY_URL_', hostlink + '/' + name + '/'+token), | ||
from: "you <[email protected]>", | ||
to: "someone <[email protected]>", | ||
subject: "Ripple Trade", | ||
'Reply-to' : '[email protected]', | ||
attachment: | ||
attachment: | ||
[ | ||
{ | ||
data:undefined, | ||
|
@@ -40,7 +41,7 @@ exports.send = function(params) { | |
var token = params.token; | ||
var hostlink = params.hostlink | ||
var message = generateMessage(email,token,name,hostlink); | ||
server.send(message, function(err, message) { | ||
//console.log(err || message); | ||
server.send(message, function(err, message) { | ||
//console.log(err || message); | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Welcome to Ripple Trade! | ||
To get started, please verify your email address below: | ||
_VERIFY_URL_ | ||
Thanks, | ||
The Ripple Trade team | ||
If you did not sign up for a Ripple account, please disregard this email. |