Receiving "InvalidParameterValue" - the absence of the final "@domain" from SES from Amazon when sending email with Unicode characters to the destination address

Amazon SES returns the error mentioned above when I try to send an email containing Unicode characters in the To: field. Amazon SES documentation says that such email addresses must be sent in the syntax of a MIME-encoded word, which the mail stone (used by ActionMailer) works correctly, it is sent as: = UTF-8? B dmluYXl2aW5heeKAmXNAbWFpbGluYXRvci5jb20 =? =

+4
source share
2 answers

, ReturnPath. , ReturnPath . ReturnPath , , .

+2

, , " @domain" AWS SES.

( , , - AWS SES "@domain" PHP SDK )

, InvalidParameterValue , .

boto3 python, Destination , , :

to = []
bcc = []
# Some code to populate one or both lists..
response = client.send_email(
        Destination={
            'ToAddresses': to,
            'BccAddresses': bcc
        },
        Message={
            'Body': {
                'Html': {
                    'Charset': MAIL_CHARSET,
                    'Data': message,
                },
                'Text': {
                    'Charset': MAIL_CHARSET,
                    'Data': message,
                },
            },
            'Subject': {
                'Charset': MAIL_CHARSET,
                'Data': subject,
            },
        },
        Source=MAIL_SENDER,
    )

dict, Destination, , InvalidParameterValue. , , :

to = []
bcc = []
# Some code to populate one or both lists..
destinations = {
            'ToAddresses': to,
            'BccAddresses': bcc
        }
response = client.send_email(
        Destination={typ: addresses
                     for typ, addresses in destinations.iteritems()
                     if addresses},
        Message={
            'Body': {
                'Html': {
                    'Charset': MAIL_CHARSET,
                    'Data': message,
                },
                'Text': {
                    'Charset': MAIL_CHARSET,
                    'Data': message,
                },
            },
            'Subject': {
                'Charset': MAIL_CHARSET,
                'Data': subject,
            },
        },
        Source=MAIL_SENDER,
    )
0

Source: https://habr.com/ru/post/1523309/


All Articles