# Mail Portal

### Introduction&#x20;

In situations where SecuMailer is not able to securely deliver an email it will return the email to the SecuMailer environment. At this point there are two possibilities to deal with the non-delivery:

* Accept non-delivery and find an alternative way to deliver the message, for instance via a physical letter
* Retry delivery via a different channel, i.e. show the content of the message on a secure web page

This Integration Guide explains how to implement the second option, alternative delivery via a secure web page.

### Process

When the SecuMailer system is triggered that an email can’t be delivered due to an insecure connection to the recipient mail server it will activate its alternative delivery function.

The alternative delivery function creates a notification email containing a unique link. This unique link contains the senders secure website address and a unique identifier that is used by the SecuMailer Portal Script to retrieve the email.

The following process takes place when using the alternative delivery process.

![](/files/-M8KTXk05ofevmR0EkNB)

### Constraints&#x20;

The SecuMailer Portal Script will only work on a website that is secured with TLS. If a customer tries to integrate the script on an unsecured website, it will not activate. If a customer is not able to configure a secure website, it is possible to configure a specific delivery website for the customer . Please discuss this option with your SecuMailer account manager.

### Instructions

The sender needs to create an empty page on their website, paste in the SecuMailer supplied HTML + JavaScript code and configure the full url of this new page in the SecuMailer management portal (<https://secumailer.app>). After configuration of the portal url in the SecuMailer management portal the portal widget is active.

#### Portal code

Copy and paste the code snippet below on your web page.

```
<div id="portal"></div>
<script>
const portalId = 'portal';
</script>
<script src="https://portal.secumail.nl/v6/assets/js/portal-jquery.min.js"></script>
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.secumailer.com/manuals/portal/portal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
