|
@@ -77,7 +77,8 @@ First, you must rename the `settings.example.conf` into `settings.conf`, and edi
|
77
|
77
|
"recipients": [
|
78
|
78
|
"you@example.tld",
|
79
|
79
|
"someone.else@example.com"
|
80
|
|
- ]
|
|
80
|
+ ],
|
|
81
|
+ "formOrigin": "https://example.tld"
|
81
|
82
|
}
|
82
|
83
|
```
|
83
|
84
|
|
|
@@ -85,6 +86,8 @@ The `mailserver` section is the set of parameters which will be passed to nodema
|
85
|
86
|
|
86
|
87
|
The `recipients` server is an array containing the e-mail addresses any message sent via the form will be sent to. Just write down the form's recipient(s)'s addresse(s).
|
87
|
88
|
|
|
89
|
+Finally, the `formOrigin` part is a string containing the origin of the page you'll include the contact form into. This allows SMAM to work with the [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) security most browser use. For more info on how to fill this field, and what is an origin, please give a look at [the MDN's definition](https://developer.mozilla.org/en-US/docs/Glossary/origin).
|
|
90
|
+
|
88
|
91
|
## Templating
|
89
|
92
|
|
90
|
93
|
Each e-mail sent by the form follows a template described in `template.pug` (it's [Pug](pugjs.org/)). If you want to change the way the e-mails you receive are displayed in your mailbox, just edit it! You don't even need to restart the server aftewards :smile:
|