Thanks, now it works. But it seems that :message string (of notify command) is limited to 255 chars. Is there any chance to change limit to 512 ?
require ["body","enotify","variables","foreverypart","mime","extracttext"];
foreverypart { if header :mime :type :is "Content-Type" "text" { extracttext :first 512 "body"; break; } }
if not header :contains "subject" "*" { notify :importance "3" :message "${body}" "mailto:test@example.com"; }
On Fri, Nov 16, 2018 at 2:53 PM Stephan Bosch stephan@rename-it.nl wrote:
Op 15-11-2018 om 23:54 schreef Bambero:
Hi,
I want to send notification like this:
if body :text :matches "*" { notify :importance "3" :message "[NOTIFY] ${1}" "mailto:test@example mailto:test@example,com"; }
The notification works but the variable ${1} seems to be empty.
But in this case:
if header :matches "Subject" "*" { notify :importance "3" :message "[NOTIFY] ${1}" "mailto:test@example mailto:test@example,com"; }
Everything works correct.
https://tools.ietf.org/html/rfc5173#section-6
Use the extracttext extension instead:
https://tools.ietf.org/html/rfc5703#section-7
Regards,
Stephan.