Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Base64 encode it and replace all + with -, replace all / with _,
- // and remove the trailing = to make it URL-safe:
- btoa(
- "From: [email protected]\r\n" +
- "To: [email protected]\r\n" +
- "Subject: Subject Text\r\n\r\n" +
- "The message text goes here"
- ).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
- // "RnJvbTogc3Rhbi50b2xlc0B5YWhvby5jb20NClRvOiBzdGFuLnRvbGVzQHlhaG9vLmNvbQ0KU3ViamVjdDogU3ViamVjdCBUZXh0DQoNClRoZSBtZXNzYWdlIHRleHQgZ29lcyBoZXJl"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement