View Single Post
Old 6 Jul 2017, 06:49 AM   #6
edu
Senior Member
 
Join Date: Jun 2016
Posts: 194
Conclusions:

1. The first method worked but wiithout sending the email address of FM, agan with ???, maybe that's what FM sends from a private address, I don't know

2.- The second method worked too, and so much better with some change. The problem is that it included in the subject the words New Email. So I deleted that part from the sieve code and all is perfect. But... some strange thing. In the subject always appears this before the text: (*1)

Do you know what could it be?

If not then no problem, it's better now. Maybe another thing from FM to tell me something... Thanks a lot

The final code until now:

Code:
if address :contains ["to"] "@"
{
notify :method "mailto" :options ["xxx@xxx.com", "From", "Orig"] :message "<xxxx@fastmail.com> / $subject$ / Email FM!";

}

xxx in email address is for private reasons.

Thanks!

Quote:
Originally Posted by jhollington View Post
Okay, gotcha.

You can try something more like this, then, if you want the "From" address to be the same as the original e-mail:

Code:
notify :method "mailto" :options ["xxx@xxx.com", "From", "Orig"] :message "$from$ / [New Email] $subject$ / You've got mail!";
Or, alternatively, you could go with something like this if you want to use a specific "from" address for the notifications:

Code:
notify :method "mailto" :options ["xxx@xxx.com", "From", "Orig"] :message "<me@mydomain.com> / [New Email] $subject$ / You've got mail!";
The key is the slashes in the :message directive — it basically takes the form of "from / subject / body." While FastMail's documentation says that if you don't use slashes, the text should go in the subject line, that doesn't actually appear to be the case, but either way, the three-part slashed option seems to be the only realistic way to do this anyway, as you've discovered.

The "From", "Orig" options after the target e-mail address tell FastMail to expand the "$from$" directive to include the name and the e-mail address. Without it, you'll just get the raw e-mail address.

See Sieve Notify Extension in FastMail's help pages for more info.

Last edited by edu : 6 Jul 2017 at 06:55 AM.
edu is offline   Reply With Quote