u-ichi / fluent-plugin-mail

Fluentd output plugin to send mail
https://rubygems.org/gems/fluent-plugin-mail
Other
48 stars 20 forks source link

String '[' is no available in Title??? #24

Closed my-dev closed 9 years ago

my-dev commented 9 years ago

Hi! Mr, sonots.

Yesterday, Thanks your nice support.

Today, once more question...please.

I can's use the string '[' in Title... Even though i use the escape string '\', it's no expected.

In message, can use it normally.

this is no serious problem, but i wanna to use it...

please support me again sorry.

sonots commented 9 years ago

Paste the conf, what is title? Do you mean subject?

my-dev commented 9 years ago

Hi! Mr, sonots.

sorry, i meant [subject]... this issue means below.

type mail host localhost port 25 domain aiueo.com from alert@aiueo.com to aaa@bbb.ccc subject --->>>[<<<--- this issue means --->>>]<<<---tag.mail.log@%s subject_out_keys param1 message [param2]:%s\n[param3]:%s\n[param4]:%s message_out_keys param2,param32,param4 time_key time time_format %Y-%m-%d %H:%M:%S

in subject param, i can't use the string '[' and ']'.

sonots commented 9 years ago

In your case, rather, message is invalid. Try

type mail
host localhost
port 25
domain aiueo.com
from alert@aiueo.com
to aaa@bbb.ccc
subject --->>>[<<<--- this issue means --->>>]<<<---tag.mail.log@%s
subject_out_keys param1
message "[param2]:%s\n[param3]:%s\n[param4]:%s"
message_out_keys param2,param32,param4
time_key time
time_format %Y-%m-%d %H:%M:%S

I quoted message by ". This issue is coming from that fluentd v0.12 treats a value as JSON array if it starts with [.

BTW: You can write a pre-formatted text with markdown like

foobar

my-dev commented 9 years ago

Hi! Mr,sonots.

I will try later.

thank you.