Commander Email Task And Saving To File 追蹤

0
Avatar
Legacy Poster

Good Morning,

I've run across an issue in one of my Commander Tasks that I can't seem to troubleshoot. I'm hoping that the experience in the forums may provide some guidance. Currently running Bartender Automation Edition 9.4. I've read all the white pages I can find, but none provide examples on how to handle an incoming email with commander script.


In Commander, I have 2 tasks running:
1) The first task polls an email account for email that contains in the body of an email the commander script. It then saves that as a .txt file to a network location.
2) The second task is polling the network location for .txt files. When it finds one, it sends the file to Bartender for printing


[b]The problem:[/b]
Commander sees the incoming email and saves the body of the email to a file. The issue is that commander is entering new line characters into the file so that when my second task tries to pass it to Bartender, it gets stuck. If I remove the new line characters manually and place the file into the network folder, the script is read properly and Bartender prints the label. Why is commander adding new line characters and how can I tell it not to? (Or, is there a way to have commander read the commander script that is in the body of the email and process it vs having to save it to a file first)



[u]Body of Email:[/u]
%BTW% /F="\\network location\Test_Label.btw" /D="%Trigger File Name%" /PRN="printer name" /Tray="Tray 3" /R=3 /P

%END

Around the Town,Jerome Davis,Buyer,1220 Governor Sq.,Hadden,Alberta,WA11DP,Canada,(171) 555-7788,(171) 555-6750, 4


[u]Body of saved text file:[/u]

%BTW% /F="\\network location\Test_Label.btw" /D="%Trigger
File Name%" /PRN="printer name" /Tray="Tray 3" /R=3 /P

%END

Around the Town,Jerome Davis,Buyer,1220 Governor
Sq.,Hadden,Alberta,WA11DP,Canada,(171) 555-7788,(171) 555-6750, 4

2 意見

0
Avatar
Ian Cummings
版主
評論操作 永久連結

Could it be that the email client that sends the email is forcing a word wrap, with CR/LF, at X number of characters? Are you able to disable that or set a higher value so that the message doesn't get chopped up?
0
Avatar
Legacy Poster
評論操作 永久連結

[quote name='Ian C - Seagull Support' timestamp='1349101264' post='3373']
Could it be that the email client that sends the email is forcing a word wrap, with CR/LF, at X number of characters? Are you able to disable that or set a higher value so that the message doesn't get chopped up?
[/quote]


I had never thought of this - after looking, Outlook was indeed adding a new line after X number of characters. I was able to correct that and Commander is saving the file just fine. Thanks!

登入寫評論。