amazon-ses

How can send PDF attachment in `Node aws-sdk` sendRawEmail function?

你。 提交于 2019-12-02 01:05:14
I want to send PDF file in attachment using sendRawEmail(Node: aws-sdk) function, I have tried lots of ways, email sends successfully but PDF goes plain. Please correct my code and help to solve it. Code is here: try { data = fs.readFileSync('files/demo-invoice-new.pdf', 'utf8'); console.log(data.toString()); var ses_mail = "From: 'AWS SES Attchament Configuration' <" + SOURCE_EMAIL + ">\n"; ses_mail = ses_mail + "To: " + toEmail + "\n"; ses_mail = ses_mail + "Subject: AWS SES Attachment Example\n"; ses_mail = ses_mail + "MIME-Version: 1.0\n"; ses_mail = ses_mail + "Content-Type: multipart

Amazon SES 403 Forbidden SignatureDoesNotMatch using Laravel 5.3

≡放荡痞女 提交于 2019-12-01 23:06:36
I am using Laravel 5.3, EC2 and SES to send emails. config/mail.php 'driver' => env('MAIL_DRIVER', 'smtp'), 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'port' => env('MAIL_PORT', 587), .env has MAIL_DRIVER=ses MAIL_HOST=email-smtp.us-west-2.amazonaws.com MAIL_PORT=25 MAIL_ENCRYPTION=TLS SES_KEY='AKIA------DZQ5TYQ' SES_SECRET=AhN8d----------------ZbBq7TNBmhNnosfYbasg6Q SES_REGION='us-west-2' composer.json "require": { "aws/aws-sdk-php": "~3.0", } EC2 is hosted in Mumbai and SES in us-west. I have tried the following : 1) Creating new IAM user and using the new key/secret. 2) Creating root

SES AWS Error Code: SignatureDoesNotMatch, Status Code: 403

大城市里の小女人 提交于 2019-12-01 03:22:55
I'm getting a AWS Error Code: SignatureDoesNotMatch, Status Code: 403 when trying to send a mail through Amazon SES. I have confirmed that I am using the correct credentials which I created via https://console.aws.amazon.com/iam/home?#users and the error still persists. I assume the credentials I've created on the iam/home are in fact global but I do not know what I am doing wrong further. The entire error is: AWS Error Code: SignatureDoesNotMatch, Status Code: 403, AWS Request ID: xxx, AWS Error Type: client, AWS Error Message: Signature expired: 20140314T031111Z is now earlier than

Can't pass my credentials to AWS PHP SDK

ぃ、小莉子 提交于 2019-12-01 00:34:45
I installed AWS PHP SDK and am trying to use SES. My problem is that it's (apparently) trying to read ~/.aws/credentials no matter what I do. I currently have this code: $S3_AK = getenv('S3_AK'); $S3_PK = getenv('S3_PK'); $profile = 'default'; $path = '/home/franco/public/site/default.ini'; $provider = CredentialProvider::ini($profile, $path); $provider = CredentialProvider::memoize($provider); $client = SesClient::factory(array( 'profile' => 'default', 'region' => 'us-east-1', 'version' => "2010-12-01", 'credentials' => [ 'key' => $S3_AK, 'secret' => $S3_PK, ] )); And am still getting "Cannot

Can't pass my credentials to AWS PHP SDK

百般思念 提交于 2019-11-30 19:27:37
问题 I installed AWS PHP SDK and am trying to use SES. My problem is that it's (apparently) trying to read ~/.aws/credentials no matter what I do. I currently have this code: $S3_AK = getenv('S3_AK'); $S3_PK = getenv('S3_PK'); $profile = 'default'; $path = '/home/franco/public/site/default.ini'; $provider = CredentialProvider::ini($profile, $path); $provider = CredentialProvider::memoize($provider); $client = SesClient::factory(array( 'profile' => 'default', 'region' => 'us-east-1', 'version' =>

Send Attachments with Amazon-SES

做~自己de王妃 提交于 2019-11-30 17:07:57
I'm searching for an working C# example to send attachments with Amazon-SES. After reading that Amazon-SES now supports sending attachments I was searching for an C# example but was unable to find one. I think that using AWS SDK for .NET and MimeKit is very easy and clean solution. You can send e-mails with attachments via SES API (instead of SMTP). You can write MimeMessage directly to MemoryStream and then use it with SES SendRawEmail: using Amazon.SimpleEmail; using Amazon.SimpleEmail.Model; using Amazon; using Amazon.Runtime; using MimeKit; private static BodyBuilder GetMessageBody() { var

Amazon SES custom header List-Unsubscribe isn't working

陌路散爱 提交于 2019-11-30 16:35:33
I'm tryin to add the "List-Unsubscribe" header in my sent emails (through amazon ses) but when i see the received email there's no such header in it. I need it to reduce the number of spam complaints and to improve deliverability and reputation. SendEmailRequest sendEmailRequest = new SendEmailRequest(); sendEmailRequest.putCustomRequestHeader(UNSUBSCRIBE_HEADER, unsuscribeURL); PS: Using others providers such as Mandrill or Sendgrid it works, but i really need it at amazon So... i found a workaround. If you want to add a custom header to your message, always use a RawMessage, not a simple one

AWS SES S3 process inbound email

北城余情 提交于 2019-11-30 14:05:39
I'm working on a publish by email system based on AWS SES. For all incoming emails I've set routing to save messages in an S3 bucket so I can asynchronously process them. The problem I have is that the messages are saved in the S3 bucket in a raw format: headers, email body, etc + the encrypted attachment (a huge string) - all in a single file. Is there a way to break the email message apart form the attachment and save both in separate files at AWS SES level? I'm trying to get the data in the format I need straight from AWS and avoid adding another processing step to the process. If AWS SES

Signing emails with DKIM in Node.js

时光总嘲笑我的痴心妄想 提交于 2019-11-30 13:57:45
I'm writing a Nodejs app that needs to be able to send email. So far, I've used Postfix in conjunction with a Nodejs module called Nodemailer to send my email through Amazon SES. Postfix has been handling the DKIM signing, but now I wish to get rid of postfix and just use Nodemailer to send emails through Amazon SES. My only problem now is finding a way to sign emails within Nodejs. I've thought of running a opendkim command using "exec" in node but haven't been able to figure that out. From searching, there looks to be no modules for this either. Can anyone help me on this? Latest version of

Send Attachments with Amazon-SES

ぐ巨炮叔叔 提交于 2019-11-30 00:29:30
问题 I'm searching for an working C# example to send attachments with Amazon-SES. After reading that Amazon-SES now supports sending attachments I was searching for an C# example but was unable to find one. 回答1: I think that using AWS SDK for .NET and MimeKit is very easy and clean solution. You can send e-mails with attachments via SES API (instead of SMTP). You can write MimeMessage directly to MemoryStream and then use it with SES SendRawEmail: using Amazon.SimpleEmail; using Amazon.SimpleEmail