TO NAV DEVELOPMENT TEAM:
I'm pretty sure you never tested the SMTP Mail Functions in NAV 2015.
If you had, you would know by now that the "AddAttachment" Function, and the DOTNET Assembly it calls, are SERIOUSLY BROKEN!!!
First off, in the "AddAttachment" Function, you have added a "FileName" Argument. Or you can say that you added an "Attachment" Argument. Either way, Fine.
But then you do an "EXISTS" Test on the ATTACHMENT Parameter, NOT the FILENAME Parameter. BAD Developer!!!
However, it gets MUCH Worse.
When I corrected THAT error, then I was STILL getting an error that A COMPLETELY BOGUS PATHNAME Was "Not Found"!!!
My "FileName" Argument (straight from the Debugger) was "'\\ccss02\e\FTP Site\AutoPilot2015\DeliveryFiles\A_P-95D92C2C8DA46EBA_60\PDFCreator.pdf'"
HOWEVER, when I continue on in the Debugger into the "Mail.AddAttchmentWithName" Function (which is calling the DOTNET Assy), I get a "Result" that states the following:
"'Could not find file 'C:\Windows\system32\PDFCreator.pdf'.'"
Now, I ASSURE you that that is NOT the PATH that I entered that DOTNET Call with (again, verified with the Debugger).
So, What's Up YET AGAIN with the SMTP Codeunit (and DOTNET Assy???) :x :x :x
There is NOTHING NEW in SMTP. LEAVE THAT CODEUNIT ALONE!!! EVERY SINGLE TIME NAV UPDATES, YOU BREAK THIS FUNCTIONALITY!!!
FIX THIS PLEASE!!!
Experience is what you get, when you don't get what you want. --Anon.
0
Comments
Microsoft, pls
You can fix the code in the AddAttachment Function like so:
Hope this helps!