Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Amazon SES SMTP Credential Generator
#!/usr/bin/env elixir
Application.start(:crypto)
key = case System.argv do
[key | _] -> key
_ ->
IO.puts "Usage: ses_credential_generator.exs [AWS Secret Access Key]"
exit(:shutdown)
end
signature = :crypto.hmac(:sha256, key, "SendRawEmail")
smtp_password = Base.encode64(<<02>> <> signature)
IO.puts smtp_password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.