caronc/apprise

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

taestell opened this issue ยท 3 comments

๐Ÿ’ก 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.

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

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

Code merged; closing issue ๐Ÿš€