Skip to Content

Extra newline in the flat file sent as an email attachment

Hello All,

We have a scenario where proxy message is sent as an email attachment to the end user. The file is in text format and we are using MessageTranformBean in the receiver channel. In the end of the file, we are getting two extra newline. The end user confirmed that they are unable to upload the files with these extra newlines.

Scenarion: Proxy -> PO -> Flat file (going to FTP server & as mail attachment)

Please suggest how to remove these extra newline from the file.

Note: We are currently using PO 7.31 single stack SP 18.

Snaphot of the file:

Parameter used in the Receiver Mail Channel:



capture-1.jpg (38.1 kB)
capture-2.jpg (58.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 12, 2017 at 03:39 PM

    Hi Bobby,

    Yes this is know issue .Here is one of the approach create 2 Structure Header and Trailer . So lets say you have 'n' no of records coming from proxy so under Header populate n-1 records and for the trailer populate the last nth record.

    Now in Module Define Header.fieldSeparator/endSeparator as '\n' or 'nl' and don't define any separator for Trailer by doing this you wont be adding an extra line at the end of the file.



    Add comment
    10|10000 characters needed characters exceeded

  • Oct 13, 2017 at 11:34 AM

    Hi Bobby!

    Did you try to use 'nl' as field separator? And did you check that your proxy message didn't contain empty 'Line' elements?

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Evgeniy,

      There is no empty 'Line' in the proxy message. And we have already tried 'nl' as a separator but still getting the extra newlines.