Created
December 31, 2015 11:43
-
-
Save SergioCrisostomo/60de7a702ea839a64b32 to your computer and use it in GitHub Desktop.
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
function makeBody(to, from, subject, message) { | |
var btoa = require('btoa'); | |
var str = ["Content-Type: text/plain; charset=\"UTF-8\"\n", | |
"MIME-Version: 1.0\n", | |
"Content-Transfer-Encoding: 7bit\n", | |
"to: ", to, "\n", | |
"from: ", from, "\n", | |
"subject: ", subject, "\n\n", | |
message | |
].join(''); | |
return btoa(str); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment