caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.91k stars 384 forks source link

Fastmail notifications should pull `to` address from `user` query param if specified #1040

Closed taestell closed 4 months ago

taestell commented 6 months ago

:bulb: The Idea

Fastmail users may configure a custom domain for their account, meaning that their email address is username@customdomain.com, NOT username@fastmail.com.

For Fastmail users without a custom domain, they can deliver an apprise notification using: mailto://username:password123@fastmail.com.

For Fastmail users with a custom domain, they can deliver an apprise notification using mailto://fastmail.com?user=username@customdomain.com&to=username@customdomain.com&pass=password123.

Notice that the same email address must be specified in both the user and to query params. If the to param is left out, the following error is returned: WARNING - Sending email to "username@fastmail.com" failed.

If a user param is specified (which will always be the full email address), it should be used as the to address by as well by default.

taestell commented 6 months ago

It would also make sense to pull use the user value for the from address by default. Currently it defaults to username@fastmail.com if the &from=username@customdomain.com query param is not specified.

caronc commented 6 months ago

I think this is a fair request. Not to sure about the second portion, but I'll see if doing it causes any issues none the less.

The from= can also be things like Apprise <noreply@example.com>. Apprise is smart enough to format this in the email it constructs

caronc commented 4 months ago

Code merged; closing issue 🚀