Skip to main content

Hi Team,

I used fmeservernotifier transformer

My content of the email looks something like this...

 

region1 : 100 features

region2 : 200 features

region3 : 300 features

 

All the features counts are in attributes. And email should be formatted like above.

if all text strings are in one row/line it comes out good. But I need multi line texts.

I mean each line shows region and its count. But when I pass this to "subscriber_content", error happens and all my email subject line and content becomes bla bla....

if it is simple one line text string, then it comes out good. And if i try to insert newline chara\\n] like below...

(region 1 : @Value(count1) \\n region 2 : @Value(count2) \\n region 3 : @Value(count3) \\n )

 

My email structure collapses. How can I achieve multi line text email message.

 

Thanks

 

 

below string copied from fme knowledge base....

{

"email_to": "recipient@example.com",

"email_cc": "",

"email_from": "sender@example.com",

"email_replyto": "",

"email_subject": "This is a sample email",

"email_attachment": "\\\\\\\\\\\\myserver\\\\\\\\\\attachment.txt",

"subscriber_content": "Hello World"

}

Try doubling the backslashes for the newline inside the JSON, for example:

(region 1 : @Value(count1) \\n region 2 : @Value(count2) \\n region 3 : @Value(count3) \\n ) 

 


Try doubling the backslashes for the newline inside the JSON, for example:

(region 1 : @Value(count1) \\n region 2 : @Value(count2) \\n region 3 : @Value(count3) \\n ) 

 

@david_r No David It did'nt work . email came, and looks like this

firstline \n second line \n third line


@david_r No David It did'nt work . email came, and looks like this

firstline \\n second line \\n third line

I'm not quite sure I understand the chain of events. Am I right in assuming that you're sending an email to FME Server containing newlines, and you want the triggered workspace on FME Server to handle those newlines?


Hi Farook,

 

I think the best way to achieve what you're after would be to format your email as HTML. You would then be able to use the break tag to create new lines/multiline email.

In the JSON message that you're sending to FME Server using the Notifier transformer you may need to add "email_format": "html" so that it doesn't send it as plain text.

 

 

Kind Regards,

Jen


Reply