擅长:python、mysql、java
<p>您可能需要使用<a href="https://boto3.readthedocs.io/en/latest/reference/services/ses.html#SES.Client.send_email" rel="nofollow noreferrer">boto3</a>并创建</p>
<pre><code>import boto3
ses_client = boto3.client('ses')
def sendEmail( ses_client, sender, recipients, subject, body ):
return ses_client.send_email(
Source = sender,
Destination = { "ToAddresses": recipients },
Message = {
"Subject": { "Data": subject, "Charset": "UTF-8" },
"Body": { "Text": { "Data": body, "Charset": "UTF-8" } }
})
</code></pre>
<p>为了使其生效,您必须验证电子邮件地址:</p>
<ul>
<li><a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html</a></li>
<li><a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses-procedure.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses-procedure.html</a></li>
</ul>