I'm sending emails using AWS Lambda function that calls the SES service via boto3. I managed to get everything working, however i would like to add 'important' priority on the email. Reading the boto3 api docs it does not state setting priority. Has anyone done this for SES please. Below is example of call to boto3:
import boto3
ses = boto3.client('ses')
email_response = ses.send_email(
Destination={
'BccAddresses': [
],
'CcAddresses': [
],
'ToAddresses': [
email_address
],
},
Message={
'Body': {
'Html': {
'Charset': 'UTF-8',
'Data': html_output,
},
},
'Subject': {
'Charset': 'UTF-8',
'Data': 'My msg'
},
},
Source=SENDER
)
You'll want to use the send_raw_email()
method instead since SMTP Priority is a SES-supported customer header field, though not as a boto3 method argument.
You can read more about the SMTP Priority field in the SMTP sending an priority email StackOverflow answer.