---
title: "Connection agent for sending emails"
canonical: "https://docs.cuesystem.com/space/TAM/242909185/Connection%20agent%20for%20sending%20emails"
format: markdown
---
This connection agent is used to send various emails from the touchONE-server. These emails may contain:

- password recovery
- user pins
- reservation confirmation emails

This connection agent is essential for the proper functioning of the touchONE-solution. It is created when the reservation suite is created. If you forget your touchONE-admin admin password, you cannot recover it without this connection agent.

For this connection agent you need to have a service account with a password on behalf of which the emails are sent.

![image](media://311cb31d-1b03-4084-a84f-6f88056ff9d6)

Emails can be sent using the following types of servers:

- Microsoft 365 using Microsoft Graph
- Exchange server using EWS (Exchange Web Services)
- SMTP server using SMTP protocol
- Google Workspace using Gmail API

For details, expand the procedures for the given server types below:

<details>
<summary>Microsoft 365</summary>

Connection agent for sending emails in Microsoft 365 needs an application registered in Azure AD. The procedure for creating an application is described here: [Registered app creating](https://cue.atlassian.net/wiki/spaces/M3SG/pages/255950885)

Use the procedure **Configuration For sending emails** or **Configuration for Common app**.

> Macro (excerpt-include)



To create a new connection agent, press the <span style="color: #0747a6">***+ NEW***</span> button in the top right corner and then <span style="color: #0747a6">***NEW MICROSOFT 365***</span> in the section **For sending emails**.

![image](media://4a552a65-6b0c-4b91-ace9-975509e8c1c0)

> Macro (excerpt-include)



> Macro (excerpt-include)



> Macro (excerpt-include)



> Macro (excerpt-include)



> Macro (excerpt-include)



#### Username

Enter here the username of the service account on behalf of which the emails are sent. For Microsoft 365, the username is typically in the email format, e.g. **touchone@contoso.com**.

> Macro (excerpt-include)



> Macro (excerpt-include)



> Macro (excerpt-include)

 

> Macro (excerpt-include)

 

> Macro (excerpt-include)
</details>

<details>
<summary>Exchange server</summary>

For Exchange, you need the address of the Exchange server. EWS (Exchange Web Services) is used for communication.

To create a new connection agent, press the <span style="color: #0747a6">***+ NEW***</span> button in the top right corner and then <span style="color: #0747a6">***NEW EXCHANGE***</span> in the section **For sending emails**.

![image](media://6ccc0db6-da57-4ba5-9c2f-d5cb0ea432e1)

> Macro (excerpt-include)

  

> Macro (excerpt-include)



#### Username

Enter here the username of the service account on behalf of which the emails are sent. For the Exchange server, the username is typically in the format **username** or **domain/username**, e.g. **touchone** or **contoso/touchone**. If this is enabled on your Exchange/AD server, it can also be in email format, e.g. **touchone@contoso.com**.

> Macro (excerpt-include)



> Macro (excerpt-include)

  

> Macro (excerpt-include)

 

> Macro (excerpt-include)
</details>

<details>
<summary>SMTP server</summary>

For SMTP, you need the address and port of the SMTP server. The SMTP protocol is used for communication. The SMTP server must support authentication using a username and password.

To create a new connection agent, press the <span style="color: #0747a6">***+ NEW***</span> button in the top right corner and then <span style="color: #0747a6">***NEW SMTP***</span> in the section **For sending emails**.

![image](media://5814e265-d2a6-45e3-8fba-cf1671c444c1)

#### > Macro (excerpt-include)

  

#### SMTP server address

Enter the SMTP server address here, e.g. “**smtp.contoso.com”**.

#### Port

Enter here the IP port number on which the SMTP server is available. For an non-encrypted unsecured connection, port 25 is typically used. For SSL-secured connections, port 465 is typically used.

#### Use SSL

If you are using an SSL-secured connection (recommended), select this check box. For an unsecured connection, leave it unchecked.

#### Account email

Enter here the email address of the service account on behalf of which the emails are sent.

#### Account password

Enter here the password for the service account.

> Macro (excerpt-include)

 

> Macro (excerpt-include)

 

> Macro (excerpt-include)
</details>

<details>
<summary>Google Workspace</summary>

For Google Workspace, you need a project with the appropriate APIs enabled and a certificate for secure communication. The procedure for creating a project and a certificate is described here: [Configuration process](https://cue.atlassian.net/wiki/spaces/GWSG/pages/198672847)

To create a new connection agent, press the <span style="color: #0747a6">***+ NEW***</span> button in the top right corner and then <span style="color: #0747a6">***NEW GOOGLE***</span> in the section **For sending emails**.

![image](media://e92bf427-d145-4302-b75b-382bfe8bd17a)

#### > Macro (excerpt-include)

  

#### Username

Enter here the username of the service account used for sending emails. For Google Workspace, the username is typically in the email format, e.g. **touchone@contoso.com**.

> Macro (excerpt-include)



> Macro (excerpt-include)



> Macro (excerpt-include)

 

> Macro (excerpt-include)
</details>


> Macro (excerpt)
> 
> #### Name
> 
> Here's the name of the connection agent. Enter it so that you can easily navigate through the connection agents.

> Macro (excerpt)
> 
> #### Authentication method
> 
> Choose here whether to use **OAuth 2.0 Resource Owner Password Credentials** (ROPC) or **OAuth 2.0 Device Code Flow** (DCF) for authentication.

> Macro (excerpt)
> 
> #### Directory ID
> 
> Enter here the Directory ID (formerly Tenant ID) of the application registered in Azure AD. Directory ID has GUID (globally unique identifier) format **xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx**, where x can be numbers 0-9 and characters a-f.

> Macro (excerpt)
> 
> #### Application ID
> 
> Enter here the Application ID (formerly Client ID) of the application registered in Azure AD. Application ID has GUID (globally unique identifier) format **xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx**, where x can be numbers 0-9 and characters a-f.

> Macro (excerpt)
> 
> #### Client secret
> 
> Enter here the Client secret of the application registered in Azure AD. The client secret is a long string of random characters.
> 
> > ℹ️ Client secret is only required for ROPC authentication.

> Macro (excerpt)
> 
> #### Password
> 
> Enter here the password for the service account.
> 
> > ℹ️ Password is only required for ROPC authentication.

> Macro (excerpt)
> 
> If you use Device Code Flow authentication, activate the Connection Agent using the <span style="color: #0747a6">***ACTIVATE ***</span>button according to the procedure described here: [Activation using Device Code Flow](https://cue.atlassian.net/wiki/spaces/TAM/pages/475201559)

> Macro (excerpt)
> 
> #### Password
> 
> Enter here the password for the service account.

> Macro (excerpt)
> 
> #### Certificate
> 
> To upload a certificate file, click the <span style="color: #0747a6">***SELECT FILEs…***</span> button. The standard file selection dialog box will open. Select a JSON certificate file accessible from your computer and confirm the selection with the <span style="color: #0747a6">***Open***</span> button. Then click the <span style="color: #0747a6">***UPLOAD***</span> button. This will upload the certificate and display its basic information (Certificate client ID and Certificate client email).

> Macro (excerpt)
> 
> #### Set this connection agent as new for sending emails
> 
> If you want to send emails using this connection agent, select this check box. Although you can have multiple connection agents stored in your settings for sending emails, only one of them is used by touchONE-server for sending emails. This checkbox is checked for this connection agent and will automatically be unchecked for the other connection agents if changed.
> 
> > ⚠️ Be careful with this option. Test connection agent to verify that new parameters are working. If the connection agent for sending emails does not work properly, you will not be able to reset the touchONE-admin administrator password if you forget it.

> Macro (excerpt)
> 
> **OAuth 2.0 Resource Owner Password Credentials** (ROPC) grant or **OAuth 2.0 Device Code Flow** can be used for authentication. For details see: [Authentication methods](https://cue.atlassian.net/wiki/spaces/M3SG/pages/284820143)

> Macro (excerpt)
> 
> #### Server address
> 
> Here enter the Exchange server address. You can either enter the public IP address (if the server is accessible at this address, e.g. “**123.45.67.89**”), the internal IP address in the LAN network (e.g.”**192.168.1.2**”.), the local name of the server (e.g. “**mail.contoso.local**”) or the global name of the server (if there is a public DNS record for it, e.g. “**exchange.contoso.com**”).

> Macro (excerpt)
> 
> ### Test send email
> 
> #### Recipient for test email
> 
> Enter here the email address to which the test email will be sent.
> 
> Then press the <span style="color: #0747a6">***TEST ***</span>button to send a test email.
> 
> If the communication with the server goes well, the message <span style="color: #006644">**Test was successfull**</span> will be displayed, otherwise the errors that occurred will be listed.
> 
> Even if the test is successful, check the target email box to make sure that the test email was actually delivered to it and was not, for example, blocked by an antispam filter.

> Macro (excerpt)
> 
> Tap <span style="color: #0747a6">***SAVE***</span><span style="color: #0747a6">* *</span>in the right top corner to save changes or <span style="color: #0747a6">***←***</span> in the left top corner to leave the window without saving.