Bob Hansen wrote:Paste the good line on top of the bad line with Word Wrap off, and the missing comma is obvious.
I did exactly what you said Bob, here are both Phil's original posted line and your modified line:
Code: Select all
SMTPSendMail>[email protected],mail.xxxx.biz,[email protected],MEAP GNF,MEAP GNF Error,GNF Error%CRLF%%CRLF%OS = %OS_VER%.%CRLF%%CRFL%Version = %versionv%,%SCRIPT_DIR%\screen\meapinfo.zip
SMTPSendMail>[email protected],mail.xxxx.biz,[email protected],MEAP GNF,MEAP GNF Error,GNF Error,%CRLF%%CRLF%OS = %OS_VER%.%CRLF%%CRLF%Version = %versionv%,%SCRIPT_DIR%\screen\meapinfo.zip
Looking at both of those in the editor with WordWrap off... you can pop the cursor back and forth between the two lines.
So place your cursor near the end of one one the lines, just prior to the last comma in the line that marks the boundary between the body and attachment parameters. In Phil's line, the first one, use the cursor keys to go before and after the comma and watch the indicator at the bottom of the editor window tell you... the parameter before the comma is the body... then move the cursor past the comma and it says attachment, that looks right.
Now do the same with your line and you'll see it shows you're already in the attachment parameter even before that last comma... so I don't think there should be a comma there.
I think Phil meant his "body" to be all of the following:
GNF Error%CRLF%%CRLF%OS = %OS_VER%.%CRLF%%CRFL%Version = %versionv%
Putting a comma after GNF Error... cuts the rest out of his body and spills it over into the attachment parameter.
Phil, you might also try isolating the comma as Bob had earlier mentioned:
Code: Select all
Let>vComma=,
Let>app_date=March 19
Let>versionnum=6.62.105
Let>versionv=%versionnum% born on %app_date%
Let>body=GNF Error%CRLF%%CRLF%OS = %OS_VER%.%CRLF%%CRLF%Version = %versionv%
Let>attachment=%SCRIPT_DIR%\screen\meapinfo.zip
SMTPSendMail>[email protected],mail.xxxx.biz,[email protected],MEAP GNF,MEAP GNF Error,body%vComma% 2009,attachment
Bob Hansen wrote:Good catch jpuziano on the wrong %CRFL%.
Thanks but I must admit the color syntax highlighting in the editor helped there... others were in red because CRLF is a system variable while CRFL isn't. I'm just glad Marcus implemented that enhancement suggestion (to show system variables in red)... because I am sure it will be helpful to all in spotting little typos like that.
On the subject of spotting errors in general and alerting the user... Marcus, can we get the item below added to the wish list?
Side Question: Marcus - Could the SMTPSendMail> command be enhanced so that if an attachment is specified but it can't find that file (for whatever reason: file doesn't exist, drive inaccessible, whatever) then the command would error out saying what is wrong?