Sieve-Example:Notify: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
If you can edit the sieve filter manually, then you can also get the Sender and add that to the subject line: |
If you can edit the sieve filter manually, then you can also get the Sender and add that to the subject line: |
||
<syntaxhighlight> |
<syntaxhighlight lang=""> |
||
# rule:[notify] |
# rule:[notify] |
||
if header :matches "Subject" "*" |
if header :matches "Subject" "*" |
Revision as of 14:59, 19 September 2016
Send a notification email to another mailbox when the mailbox gets an email:
If you can edit the sieve filter manually, then you can also get the Sender and add that to the subject line:
# rule:[notify]
if header :matches "Subject" "*"
{
set "subject" "${1}";
}
if header :matches "From" "*"
{
set "from" "${1}";
}
notify :importance "2" :message "[Notification] ${from}: ${subject}" "mailto:someone@example.com";
This sets a variable of the subject, and then sends an email to another mailbox using the subject line.