I am polling an email account, and that works great. I would like also to have a backup copy of the received messages as files (.eml). I have tried something like this:
from( mailurl+"?username="+username+"&password="+password+"&"+options)
.to( "file://backup?allowNullBody=false&forceWrites=true");
What I get is a file for every received email with a generated name like ID-MACHINENAME-2443-1211718892437-1-0
in the desired directory, but the file is empty. I know I can make my own .eml file using a processor, but, isn't there a more straightforward way to do it using just routes? Why is the created file empty?
eml
file format, though they mostly follow RFC 0822. Perhaps that's why there is no straight forward way to persist it. Body of theIN
message should contain the email messages text body. Is your mail body empty by any chance? This test case may give you mode ideas. – ShellDragon Jun 13 '19 at 12:39