I am trying to send email with AWS SES which,the raw email will be put in the S3, on file lambda will trigger and parse customer headers.
Example:
How can i add custom headers like X-moto-dealerId : 4324
client = boto3.client('ses')
response = client.send_email(
Source=email_from,
Destination={
'ToAddresses': [email_to]
},
Message={
'Subject': {
'Data': 'string',
'Charset': 'UTF-8'
},
'Body': {
'Text': {
'Data': generated_adf,
'Charset': 'UTF-8'
}
}
},
)
You need to use the send_raw_email
function of boto3 instead of send_email
.
Some additional sources of information: