# Setting up a custom SMTP server

In order to send e-mails through your own infrastructure, you may set up SMTP server for freispace to use.

## Setting up a new server[​](#setting-up-a-new-server "Direct link to Setting up a new server")

1. Go to the **Team settings**.

2. Switch to the tab **Administration**.

3. Scroll down to the **SMTP servers** section and click **Add SMTP server**.

4. Enter an internal name followed by your SMTP server settings.

   * By default, we use freispace servers as a fallback if your SMTP server fails to accept our message three times. Although we strongly advise against it, you may disable this behaviour by activating **Deactivate fallback**. Doing so may result in e-mails such as invoices not being able to be sent.

   * You may **Enable debugging** for us to log interactions with your server. This may help diagnose connection issues.

5. Click **Add**.

#### Testing your new server[​](#testing-your-new-server "Direct link to Testing your new server")

Once you have created an SMTP server, you may test the connection by clicking the **Test** button.

info

You still need to enable sending through your newly added server. Follow the next steps to actually start sending e-mails.

## Enabling sending through your server[​](#enabling-sending-through-your-server "Direct link to Enabling sending through your server")

Whilst you have now added your SMTP server, we still need to set up *when* to use it.

You may use a different SMTP server for each Company entity you have set up.

1. Go to the **Team settings**.

2. Switch to the tab **Company entities**.

3. Edit the legal entity that should use your SMTP server.

4. Under **E-mail dispatch**, select your SMTP server.

5. Click **Save**.

Whenever the Company entity is now selected for a billing document, we will use your SMTP server to deliver the document.
