Skip to content

SES does not work with semicolons

0

I have an ERP application that uses the SES service. But it does not send emails to recipients when emails are separated by semicolons (;) they only work with (,). I can't change the source code, as it is standardized. Is there any configuration in SES that I can do to allow it?

Thanks

3 Answers
1

I don't think there's anything you can do to modify the behaviour of SES's SMTP implementation. RFC 5322 requires using the comma , to separate the addresses. The "To" field is specified in section 3.6.3 (https://datatracker.ietf.org/doc/html/rfc5322#section-3.6.3) and the address-list syntax specifying the comma as the separator in section 3.4 (https://datatracker.ietf.org/doc/html/rfc5322#section-3.4). It's a clear bug and protocol violation in your sending ERP application.

Does your ERP application allow specifying the recipients in Bcc (blind carbon copy) instead of the To field? That would avoid putting the address list in the RFC 5322 message at all and only communicating the recipients at the SMTP "envelope" layer (RFC 5321), where they would appear one by one instead of as a list.

EXPERT
answered a year ago
EXPERT
reviewed a year ago
0
Accepted Answer

You can implement a workaround by modifying the email addresses before sending them to SES. Since you mentioned that you cannot change the source code of your ERP application, you can consider using an AWS Lambda function to preprocess the email addresses before sending them to SES.

Here's a high-level overview of the steps you can follow:

Create an AWS Lambda function: Create a new Lambda function in your AWS account. You can use Python, Node.js, or any other supported language for this function.

Write the function code: In your Lambda function code, implement logic to replace the semicolons (;) with commas (,) in the recipient email addresses. For example, in Python, you can use the str.replace() method to replace semicolons with commas.

Configure the Lambda function trigger: Configure your Lambda function to be triggered by an event that occurs before the email is sent from your ERP application. This could be an Amazon SQS queue, an Amazon SNS topic, or an API Gateway endpoint, depending on your application's architecture.

Integrate with SES: After the Lambda function has processed the email addresses and replaced semicolons with commas, use the AWS SDK (e.g., boto3 for Python) within your Lambda function to send the email via Amazon SES.

Test and deploy: Test your Lambda function locally or in the AWS Lambda console to ensure it works as expected. Once satisfied, deploy your Lambda function and update your ERP application to trigger the Lambda function before sending emails.

By implementing this solution, your ERP application can continue to use semicolons (;) as separators for email addresses, and the Lambda function will preprocess the addresses before sending them to SES, ensuring that SES receives the email addresses separated by commas (,).

Please note that this solution requires some coding and integration work, but it should allow you to use SES without modifying the source code of your ERP application.

answered a year ago
AWS
EXPERT
reviewed 8 months ago
0

@Leo K Thanks for your answer. In this case, I opened a request to the ERP supplier contemplating their response so that they can correct it. If this is not possible, I will use the tip from @Jittu.

Regards

answered a year ago
  • No problem, but it seems you marked the wrong answer as accepted though. Your SMTP connector won't talk to a Lambda function.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.