Updated Notify_email (markdown)

master
Chris Caron 2022-12-10 10:14:19 -05:00
parent c53366b086
commit feea4aa9b5
1 changed files with 15 additions and 15 deletions

@ -28,10 +28,10 @@ Secure connections are always implied whether you choose to use **mailto://** or
**Note** SendGrid users just need to be sure to use a Validated Domain (through their service) as part of the required **from=** email address (on the URL) or it will not work. It's additionally worth pointing out that [[sendgrid://|Notify_sendgrid]] has it's own separate integration as well if you do not need to use the SMTP service.
## Email Addresses
## Email Address Formatting
When defining your email address you want to send to, you can format them in 2 ways:
- Classic: `just.an.email@domain.com`
- Name/Email: `John Doe <just.an.email@domain.com>`
- Name/Email: `John<just.an.email@domain.com>`
Annotating your emails with names allow your delivered emails to have a nicer look/feel. You can also leverage these formats with the `from=` directive (defined below) allowing you to change who the email otherwise identifies who is sending it (providing your Mail Provider allows for it).
@ -41,9 +41,10 @@ If you're using a specific SMTP Server or one that simply isn't in the *Built-In
First off, secure vs insecure emails are defined by **mailto://** (port 25) and **mailtos://** (port 587) where **mailtos://** will enable TLS prior to sending the user and password.
Here are some more example syntax you can use when doing the custom approach:
* **mailto**://**{user}**:**{password}**@**{domain}**
* **mailto**://**{user}**:**{password}**@**{domain}**:**{port}**?smtp=**{smtp_server}**
* **mailto**://**{user}**:**{password}**@**{domain}**:**{port}**?from=**{from_email}**&name=**{from_name}**
* `mailto://{user}:{password}@{domain}`
* `mailto://{user}:{password}@{domain}:{port}?smtp={smtp_server}`
* `mailto://{user}:{password}@{domain}:{port}?from={from_email}`
* `mailto://{user}:{password}@{domain}:{port}?from={from_name} <{from_email}>`
Using a local relay server that does not require authentication? No problem, use this:
* **mailto**://**{user}**:**{password}**@**{domain}**:**{port}**?from=**{from_email}**&to=**{to_email}**
@ -52,27 +53,26 @@ Some mail servers will require your {user} to be your full email address. In the
* **mailto**://**{password}**@**{domain}**:**{port}**?user=**{user}**
#### Custom Syntax Examples
If your SMTP server is identified by a different hostname than what is identified by the suffix of your email, then you'll need to specify it as an argument; for example:
* **mailtos**://**user**:**password**@**server.com**?smtp=**smtp.server.com**
If you want to adjust the email's *ReplyTo* address, then you can do the following:
* **mailtos**://**user**:**password**@**server.com**?smtp=**smtp.server.com**&from=**noreply@server.com**
If your SMTP server is identified by a different hostname/domain than what is identified by the suffix of your email, then you'll need to specify it as an argument; for example:
If you want to adjust the email's ReplyTo address, then you can do the following:
* `mailtos://user:password@server.com?smtp=smtp.server.com&from=noreply@server.com`
You can also adjust the ReplyTo's Name too:
* **mailtos**://**user**:**password**@**server.com**?smtp=**smtp.server.com**&from=**noreply@server.com**&name=**Optional%20Name**
* `mailtos://user:password@server.com?smtp=smtp.server.com&from=Optional%20Name<noreply@server.com>`
To send an email notification via a smtp server that does not require authentication, simply leave out the user and pass parameters in the URL:
* **mailto**://**server.com**?smtp=**smtp.server.com**&from=**noreply@server.com**&to=**myemail@server.com**
* `mailto://server.com?smtp=smtp.server.com&from=noreply@server.com&to=myemail@server.com`
Since URLs can't have spaces in them, you'll need to use '**%20**' as a place-holder for one (if needed). In the example above, the email would actually be received as *Optional Name*.
Got a local passwordless SMTP relay service you're hosting? No problem, the following URL will work:
* `mailto://localhost`
Since URLs can't have spaces in them, you'll need to use '**%20**' as a place-holder for one (if needed). In the example above, the email would actually be received as *Optional Name*.
### Multiple To Addresses
By default your `mailto://` URL effectively works out to be `mailto://user:pass@domain` and therefore attempts to send your email to `user@domain` unless you've otherwise specified a `to=`. But you can actually send an email to more then one address using the same URL. Here are some examples (written slightly differently but accomplish the same thing) that send an email to more then one address:
* `mailto://user:pass@domain/?to=target@example.com,target2@example.com`
* `mailto://user:pass@domain/target@example.com/target2@example.com`
* `mailto://user:pass@domain/Accounting<accounting@example.com>/Billing<billing@example.com>`
There is no limit to the number of addresses you either separate by comma (**,**) and/or add to your `mailto://` path separated by a slash (**/**).
@ -91,7 +91,7 @@ The Carbon Copy (**cc=**) and Blind Carbon Copy (**bcc=**) however are applied t
| name | No | With respect to {from_email}, this allows you to provide a name with your *Reply-To* address. <br/>**Note:** This field has become redundant and become synonymous to `from=`. It still behaves as it did in previous versions, but you can also follow the `A User<user@email.com>` syntax as well. To eliminate ambiguity; the values parsed from the `from=` will always trump the `name=`.
| cc | No | Carbon Copy email address(es). More than one can be separated with a space and/or comma.
| bcc | No | Blind Carbon Copy email address(es). More than one can be separated with a space and/or comma.
| mode | No | This is only referenced if using **mailtos://** (a secure url). The Mode allows you to change the connection method. Some sites only support SSL (mode=**ssl**) while others only support STARTTLS (mode=**starttls**). The default value is **starttls**.
| mode | No | This is only referenced if using **mailtos://** (a secure url). The Mode allows you to change the connection method. Some sites only support SSL (mode=**ssl**) while others only support STARTTLS (mode=**starttls**). The default value is **starttls**. If you define a `mode` with a `mailto://` declaration, it is upgraded to be a `mailtos://` when the URL is processed.
To eliminate any confusion, any url parameter (key=value) specified will over-ride what was detected in the url; hence:
* `mailto://usera:pass123@domain.com?user=foobar`: the user of `foobar` would over-ride the user `usera` specified. However since the password was not over-ridden, the password of `pass123` would be used still.