2015 Microsoft.Dynamics.Nav.SMTP.SmtpMessage BROKEN???

OldNavDog
Member Posts: 88
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!!!
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
-
Any news on this?
Microsoft, pls0 -
Any word on this?
You can fix the code in the AddAttachment Function like so:AddAttachment(Attachment : Text;FileName : Text) IF Attachment = '' THEN EXIT; //AttachFix Start - Fix NAV Error! New Argument "Filename" was added; but code below was not adjusted to use the EXISTS against it! //IF NOT EXISTS(Attachment) THEN IF NOT EXISTS(FileName) THEN //AttachFix - Fixed the above line with this line ERROR(Text002,Attachment); //Result := Mail.AddAttachmentWithName(Attachment,FileName); //THIS DOTNET ASSEMBLY IS COMPLETELY BROKEN!!! THIS METHOD IS USELESS UNTIL FIXED BY NAV. Result := Mail.AddAttachments(FileName); //Until NAV/MS Fixes this, use an "Alternate" DOTNET Method that can still accept a TEXT Argument for Filename //AttachFix Finish IF Result <> '' THEN ERROR(Text003,Result);
Hope this helps!Experience is what you get, when you don't get what you want. --Anon.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions