In this document, we will show how you can use these system libraries in the script.
You can find more examples in the MailgunEmail Server Code plugin.
- Create a new Server Code script:
- Name the script to TestEncodeDecodeLibs and replace the default script with the below sample code and save:
const user = "test"; const pass = "123"; const encoded = encodeBase64(user + ":" + pass); console.log("encoded: " + encoded); const decoded = decodeBase64(encoded); console.log("decoded: " + decoded);
Here is how the new script should look like:
- Go to the script Dependencies tab and select the libraries:
- Then go back to the script Run tab and test your script:
Updated 10 months ago
Did this page help you?