, , " @domain" AWS SES.
( , , - AWS SES "@domain" PHP SDK
)
, InvalidParameterValue , .
boto3 python, Destination , , :
to = []
bcc = []
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 = []
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,
)