Encode/decode SMTP AUTH username/passwords

When using SMTP AUTH, the username and password are base64 encoded. Here’s a snip of perl that will encode a string:

This will produce something like this:

And here’s the decode:

which of course yields:

Have a project or a problem?

Talk with a senior engineer for practical recommendations—no obligation.

Leave a comment

3 Responses

  1. Something tells me that second one should use the decode_base64 function. You should try your “solutions” before putting them on the Internet.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.