Signer::AWSv4::SES - Generate passwords for sending email through SES SMTP servers with IAM credentials
use Signer::AWSv4::SES; $pass_gen = Signer::AWSv4::SES->new( access_key => 'AKIAIOSFODNN7EXAMPLE', secret_key => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', region => 'us-east-1', ); $pass_gen->smtp_password;
Generate passwords for sending email through SES SMTP servers with IAM credentials. The IAM user needs to have the ses:SendRawEmail IAM permission to be able to send mail.
This module generates v4 signatures for SES, unlike lots of other examples around the Internet, that use the old v2 signature scheme, although a fallback for obtaining a v2 password is still there, just in case you want to use it.
This module requires access_key, secret_key and region passed to the constructor
access_key
secret_key
region
This has to be used as the user for SMTP authentication to the SES SMTP endpoint
This has to be used as the password the SMTP authentication
This is the password in Version 2 format (not recommended). It is not dependant on the region, so you can basically pass any value to it if you're only interested in the v2 signature.
This calculates the name of the SMTP endpoint in funtion of the region.
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp.html
The source code is located here: https://github.com/pplu/AWSv4Signer
Please report bugs to: https://github.com/pplu/AWSv4Signer/issues
Jose Luis Martinez pplusdomain@gmail.com
Copyright (c) 2018 by Jose Luis Martinez
This code is distributed under the Apache 2 License. The full text of the license can be found in the LICENSE file included with this module.
To install Signer::AWSv4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Signer::AWSv4
CPAN shell
perl -MCPAN -e shell install Signer::AWSv4
For more information on module installation, please visit the detailed CPAN module installation guide.