Updated Notify_email (markdown)

Chris Caron 2021-11-25 15:12:28 -05:00
parent 82b37c093e
commit 8ccec09ff2

@ -8,16 +8,16 @@
## Using Built-In Email Services
If you are using one of the following Built-In E-Mail services, then setting up this notification service has never been easier. If your provider isn't on the list and you'd like to request it, just [open up a ticket](https://github.com/caronc/apprise/issues) and let me know. The alternative the the below list is to use a custom email server configuration; these are a little bit more complicated to set up, but still work great. Custom email configuration is discussed in the [next section](https://github.com/caronc/apprise/wiki/Notify_email/_edit#using-custom-servers-syntax).
The following syntaxes work right out of the box:
* mailto://{userid}:{password}@**yahoo.com**
* mailto://{userid}:{password}@**hotmail.com**
* mailto://{userid}:{password}@**live.com**
* mailto://{userid}:{password}@**prontomail.com**
* mailto://{userid}:{password}@**gmail.com**
* mailto://{userid}:{app-password}@**fastmail.com**
* mailto://{userid}:{password}@**zoho.com**
* mailto://{userid}:{password}@**yandex.com**
* mailto://{userid}:{password}@**sendgrid.com**?from=noreply@{validated_domain}
The following syntax works right out of the box:
* mailto://{user}:{password}@**yahoo.com**
* mailto://{user}:{password}@**hotmail.com**
* mailto://{user}:{password}@**live.com**
* mailto://{user}:{password}@**prontomail.com**
* mailto://{user}:{password}@**gmail.com**
* mailto://{user}:{app-password}@**fastmail.com**
* mailto://{user}:{password}@**zoho.com**
* mailto://{user}:{password}@**yandex.com**
* mailto://{user}:{password}@**sendgrid.com**?from=noreply@{validated_domain}
Secure connections are always implied whether you choose to use **mailto://** or **mailtos://**
@ -32,26 +32,26 @@ If you're using your own 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 example syntaxes you can use when doing the custom approach:
* **mailto**://**{userid}**:**{password}**@**{domain}**
* **mailto**://**{userid}**:**{password}**@**{domain}**:**{port}**?smtp=**{smtp_server}**
* **mailto**://**{userid}**:**{password}**@**{domain}**:**{port}**?from=**{from_email}**&name=**{from_name}**
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}**
Using a local relay server that does not require authentication? No problem, use this:
* **mailto**://**{userid}**:**{password}**@**{domain}**:**{port}**?from=**{from_email}**&to=**{to_email}**
* **mailto**://**{user}**:**{password}**@**{domain}**:**{port}**?from=**{from_email}**&to=**{to_email}**
Some mail servers will require your {userid} to be your full email address. In these cases, you'll need to specify your username in the url as an attribute like so:
* **mailto**://**{password}**@**{domain}**:**{port}**?user=**{userid}**
Some mail servers will require your {user} to be your full email address. In these cases, you'll need to specify your username in the url as an attribute like so:
* **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**://**userid**:**password**@**server.com**?smtp=**smtp.server.com**
* **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**://**userid**:**password**@**server.com**?smtp=**smtp.server.com**&from=**noreply@server.com**
* **mailtos**://**user**:**password**@**server.com**?smtp=**smtp.server.com**&from=**noreply@server.com**
You can also adjust the ReplyTo's Name too:
* **mailtos**://**userid**:**password**@**server.com**?smtp=**smtp.server.com**&from=**noreply@server.com**&name=**Optional%20Name**
* **mailtos**://**user**:**password**@**server.com**?smtp=**smtp.server.com**&from=**noreply@server.com**&name=**Optional%20Name**
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**
@ -70,8 +70,8 @@ The Carbon Copy (**cc=**) and Blind Carbon Copy (**bcc=**) however are applied t
### Parameter Breakdown
| Variable | Required | Description
| ----------- | -------- | -----------
| userid | Yes | The account login to your SMTP server; if this is an email you must specify this near the end of the URL as an argument. You can over-ride this by specifying `?user=` on the URL string.<br/>**Note:** Both the `userid` and `pass` are not required if you're using an anonymous login.
| pass | Yes | The password required to send an email via your SMTP Server. You can over-ride this by specifying `?pass=` on the URL string.<br/>**Note:** Both the `userid` and `pass` are not required if you're using an anonymous login.
| user | Yes | The account login to your SMTP server; if this is an email you must specify this near the end of the URL as an argument. You can over-ride this by specifying `?user=` on the URL string.<br/>**Note:** Both the `user` and `pass` are not required if you're using an anonymous login.
| pass | Yes | The password required to send an email via your SMTP Server. You can over-ride this by specifying `?pass=` on the URL string.<br/>**Note:** Both the `user` and `pass` are not required if you're using an anonymous login.
| domain | Yes | If your email address was **test@example.com** then *example.com* is your domain. You must provide this as part of the URL string!
| port | No | The port your SMTP server is listening on. By default the port is **25** for **mailto://** and **587** for all **mailtos://** references.
| smtp | No | If the SMTP server differs from your specified domain, then you'll want to specify it as an argument in your URL.
@ -83,7 +83,7 @@ The Carbon Copy (**cc=**) and Blind Carbon Copy (**bcc=**) however are applied t
| 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**.
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 userid of `foobar` would over-ride the userid `usera` specified. However since the password was not over-ridden, the password of `pass123` would be used still.
* `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.
#### Example
Send a email notification to our hotmail account:
@ -96,7 +96,7 @@ apprise -vv -t "Test Message Title" -b "Test Message Body" \
# Send an email to a custom provider:
# Assuming the {domain} is example.com
# Assuming the {userid} is george
# Assuming the {user} is george
# Assuming the {password} is pass123
apprise -vv -t "Test Message Title" -b "Test Message Body" \
mailto://george:pass123@example.com
@ -104,10 +104,10 @@ apprise -vv -t "Test Message Title" -b "Test Message Body" \
# The above URL could also have been written like:
# mailto://example.com?user=george&pass=pass123
# In some cases, the {userid} is an email address. In this case
# In some cases, the {user} is an email address. In this case
# you can place this information in the URL parameters instead:
# Assuming the {domain} is example.com
# Assuming the {userid} is george@example.com
# Assuming the {user} is george@example.com
# Assuming the {password} is pass123
apprise -vv -t "Test Message Title" -b "Test Message Body" \
"mailto://example.com?user=george@example.com&pass=pass123"