MCPcopy Create free account
hub / github.com/awsdocs/aws-doc-sdk-examples / SesDestination

Class SesDestination

python/example_code/ses/ses_email.py:25–47  ·  view source on GitHub ↗

Contains data about an email destination.

Source from the content-addressed store, hash-verified

23
24# snippet-start:[python.example_code.ses.SesDestination]
25class SesDestination:
26 """Contains data about an email destination."""
27
28 def __init__(self, tos, ccs=None, bccs=None):
29 """
30 :param tos: The list of recipients on the 'To:' line.
31 :param ccs: The list of recipients on the 'CC:' line.
32 :param bccs: The list of recipients on the 'BCC:' line.
33 """
34 self.tos = tos
35 self.ccs = ccs
36 self.bccs = bccs
37
38 def to_service_format(self):
39 """
40 :return: The destination data in the format expected by Amazon SES.
41 """
42 svc_format = {"ToAddresses": self.tos}
43 if self.ccs is not None:
44 svc_format["CcAddresses"] = self.ccs
45 if self.bccs is not None:
46 svc_format["BccAddresses"] = self.bccs
47 return svc_format
48
49
50# snippet-end:[python.example_code.ses.SesDestination]

Callers 3

test_send_emailFunction · 0.90
usage_demoFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_send_emailFunction · 0.72