> For the complete documentation index, see [llms.txt](https://community-test.logicnets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://community-test.logicnets.com/release-9/platform-documentation/system-administration/email-configuration/email-from-on-premise-hosted-server.md).

# Email from On-premise Hosted Server

## Description

LogicNets offers email functionality that allows you to model functionality to send email to the outside world. Before this functionality can be used, however, you must correctly configure the server running LogicNets. This article addresses the configuration required if you want to send mails with a *from* address that uses your own domain.

### Option 1: Basic Setup (Not Recommended)

You can configure LogicNets applications to send emails, which requires that you configure an SMTP server. The default setup is that the mail server is reachable on the localhost via port 25.

```
_global = {
    SMTP_SERVER = "localhost",
    SMTP_FROM_ADDRESS = "noreply@logicnets.com",
    SMTP_PORT = 25,
}
```

The default setup can be changed by placing the configuration in the company settings file. The typical setup will look like this:

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-7cda66a1bf94f99e0b39c636ecc64761bfff5bef%2F305aca69-1591-4b53-bbef-aebf7b87422e.png?alt=media)

This setup is not suitable when you want to use your own domain as the *from* address. It is also not suitable when you want to use SPF, DKIM, and/or DMARC functionality to ensure that your mails are not treated as SPAM.

### Option 2: Advanced Setup for Using Own Domain

To use your corporate mail server, use the following setup:

* Install a localhost relay mail server (e.g. MailEnable) on the server where LogicNets is installed. See <https://www.mailenable.com> or II6 for Windows or Postfix for CentOS.
* Configure this localhost mail server to relay all incoming messages to another SMTP server. If you are using MailEnable, you must enable Smart Host in the SMTP properties.

![](https://2802811211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdFhfexCjZ5JMhwGzzywq%2Fuploads%2Fgit-blob-cbd41cb3badf23da2e1dcdc12f058087d8a8432f%2Fe037606f-cf02-42ba-8c7a-c11ffe69040e.png?alt=media)

This option is suitable for implementations that include SPF, DKIM, and/or DMARC functionality to reduce the risk that your mails are treated as SPAM. Your central mail server and DNS does not need to be adapted, since the local mail server sends all the mails to the central mail server first and all recipients think that the mails are sent from the trusted central mail server. The communication between the local and central mail server uses the SMTP protocol, which is the same protocol used to send email through an internet service provider. The central mail server needs to set up an email account and password, which are used by the local mail server as credentials in the SMTP protocol.

Note: Windows Server 2012 and later offer out-of-the-box SMTP relaying. This feature is not available on Windows 7 or Windows 10 versions.

The following links provide information on setting up email relay:

* CentOS Postfix setup: <http://www.omb-automation.com/redmine/projects/dw_os_cos7/wiki/Config_postfix_smarthost>
* CentOS Postfix setup for Office365: <https://linuxhowtoguide.blogspot.com/2017/03/how-to-configure-postfix-smtp-relay.html>
* CentOS Postfix setup for AWS SES: <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html>
* CentOS Postfix setup for SMTP2GO: <https://www.smtp2go.com/setupguide/postfix/>
* Windows Server email relay setup: <https://support.hostway.com/hc/en-us/articles/360002248059-How-to-Set-Up-An-Internal-SMTP-Service-For-Windows-Server>
* Windows IIS6 setup for SMTP2GO: <https://www.smtp2go.com/setupguide/iis/>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://community-test.logicnets.com/release-9/platform-documentation/system-administration/email-configuration/email-from-on-premise-hosted-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
