:doc:`WorkMail <../../workmail>` / Client / register_mail_domain

********************
register_mail_domain
********************



.. py:method:: WorkMail.Client.register_mail_domain(**kwargs)

  

  Registers a new domain in WorkMail and SES, and configures it for use by WorkMail. Emails received by SES for this domain are routed to the specified WorkMail organization, and WorkMail has permanent permission to use the specified domain for sending your users' emails.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/RegisterMailDomain>`_  


  **Request Syntax**
  ::

    response = client.register_mail_domain(
        ClientToken='string',
        OrganizationId='string',
        DomainName='string'
    )
    
  :type ClientToken: string
  :param ClientToken: 

    Idempotency token used when retrying requests.

    This field is autopopulated if not provided.

  
  :type OrganizationId: string
  :param OrganizationId: **[REQUIRED]** 

    The WorkMail organization under which you're creating the domain.

    

  
  :type DomainName: string
  :param DomainName: **[REQUIRED]** 

    The name of the mail domain to create in WorkMail and SES.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`WorkMail.Client.exceptions.MailDomainInUseException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationStateException`

  
  *   :py:class:`WorkMail.Client.exceptions.LimitExceededException`

  
  *   :py:class:`WorkMail.Client.exceptions.InvalidParameterException`

  