Connect / Client / send_outbound_email

send_outbound_email#

Connect.Client.send_outbound_email(**kwargs)#

Send outbound email for outbound campaigns. For more information about outbound campaigns, see Set up Amazon Connect outbound campaigns.

Note

Only the Amazon Connect outbound campaigns service principal is allowed to assume a role in your account and call this API.

See also: AWS API Documentation

Request Syntax

response = client.send_outbound_email(
    InstanceId='string',
    FromEmailAddress={
        'EmailAddress': 'string',
        'DisplayName': 'string'
    },
    DestinationEmailAddress={
        'EmailAddress': 'string',
        'DisplayName': 'string'
    },
    AdditionalRecipients={
        'CcEmailAddresses': [
            {
                'EmailAddress': 'string',
                'DisplayName': 'string'
            },
        ]
    },
    EmailMessage={
        'MessageSourceType': 'TEMPLATE'|'RAW',
        'TemplatedMessageConfig': {
            'KnowledgeBaseId': 'string',
            'MessageTemplateId': 'string',
            'TemplateAttributes': {
                'CustomAttributes': {
                    'string': 'string'
                },
                'CustomerProfileAttributes': 'string'
            }
        },
        'RawMessage': {
            'Subject': 'string',
            'Body': 'string',
            'ContentType': 'string'
        }
    },
    TrafficType='GENERAL'|'CAMPAIGN',
    SourceCampaign={
        'CampaignId': 'string',
        'OutboundRequestId': 'string'
    },
    ClientToken='string'
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

    The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • FromEmailAddress (dict) –

    [REQUIRED]

    The email address to be used for sending email.

    • EmailAddress (string) – [REQUIRED]

      The email address with the instance, in [^s@]+@[^s@]+.[^s@]+ format.

    • DisplayName (string) –

      The display name of email address.

  • DestinationEmailAddress (dict) –

    [REQUIRED]

    The email address to send the email to.

    • EmailAddress (string) – [REQUIRED]

      The email address with the instance, in [^s@]+@[^s@]+.[^s@]+ format.

    • DisplayName (string) –

      The display name of email address.

  • AdditionalRecipients (dict) –

    The additional recipients address of the email in CC.

    • CcEmailAddresses (list) –

      The additional CC email address recipients information.

      • (dict) –

        Contains information about a source or destination email address

        • EmailAddress (string) – [REQUIRED]

          The email address with the instance, in [^s@]+@[^s@]+.[^s@]+ format.

        • DisplayName (string) –

          The display name of email address.

  • EmailMessage (dict) –

    [REQUIRED]

    The email message body to be sent to the newly created email.

    • MessageSourceType (string) – [REQUIRED]

      The message source type, that is, RAW or TEMPLATE.

    • TemplatedMessageConfig (dict) –

      Information about template message configuration.

      • KnowledgeBaseId (string) – [REQUIRED]

        The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • MessageTemplateId (string) – [REQUIRED]

        The identifier of the message template Id.

      • TemplateAttributes (dict) – [REQUIRED]

        Information about template attributes, that is, CustomAttributes or CustomerProfileAttributes.

        • CustomAttributes (dict) –

          An object that specifies the custom attributes values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template.

          • (string) –

            • (string) –

        • CustomerProfileAttributes (string) –

          An object that specifies the customer profile attributes values to use for variables in the message template. This object contains different categories of key-value pairs. Each key defines a variable or placeholder in the message template.

    • RawMessage (dict) –

      The raw email body content.

      • Subject (string) – [REQUIRED]

        The email subject.

      • Body (string) – [REQUIRED]

        The email message body.

      • ContentType (string) – [REQUIRED]

        Type of content, that is, text/plain or text/html.

  • TrafficType (string) –

    [REQUIRED]

    Denotes the class of traffic.

  • SourceCampaign (dict) –

    A Campaign object need for Campaign traffic type.

    • CampaignId (string) –

      A unique identifier for a campaign.

    • OutboundRequestId (string) –

      A unique identifier for a each request part of same campaign.

  • ClientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • Connect.Client.exceptions.InvalidRequestException

  • Connect.Client.exceptions.ServiceQuotaExceededException

  • Connect.Client.exceptions.AccessDeniedException

  • Connect.Client.exceptions.ResourceNotFoundException

  • Connect.Client.exceptions.ThrottlingException

  • Connect.Client.exceptions.InternalServiceException

  • Connect.Client.exceptions.IdempotencyException