Advertisement
Guest User

Untitled

a guest
Dec 19th, 2016
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Base64 encode it and replace all + with -, replace all / with _,
  2. // and remove the trailing = to make it URL-safe:
  3. btoa(
  4.   "From: [email protected]\r\n" +
  5.   "To: [email protected]\r\n" +
  6.   "Subject: Subject Text\r\n\r\n" +
  7.  
  8.   "The message text goes here"
  9. ).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
  10.  
  11. // "RnJvbTogc3Rhbi50b2xlc0B5YWhvby5jb20NClRvOiBzdGFuLnRvbGVzQHlhaG9vLmNvbQ0KU3ViamVjdDogU3ViamVjdCBUZXh0DQoNClRoZSBtZXNzYWdlIHRleHQgZ29lcyBoZXJl"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement