SMTP Mail Attachment File Remains Open
timgrant
Member Posts: 15
Hi,
Just in relation to this problem:
viewtopic.php?f=23&t=48012&hilit=smtp+attachment
I still have this locking problem with version 7.3.0.1 of the component and I use the Dispose command straight after the .Send command and it sending successfully
The below links highlight the same issue, but it still locks for me. Has anyone else seen this problem persist?
NAV build 6.00.35003
To keep it in simple form, the code is like this:
....
l_autMail.AddAttachments('c:\temp\Licence ' + l_recSH."No." + '.pdf');
l_txtResult := l_autMail.Send(l_recSMTPSetup."SMTP Server", 25, FALSE, '', '', FALSE);
l_autMail.Dispose;
IF NOT ERASE('c:\temp\Licence ' + l_recSH."No." + '.pdf')THEN;
ERROR('Error on delete');
.....
https://mbs2.microsoft.com/Knowledgebas ... %242280492
MIcrosoft says to add in the new Dispose line:
PROCEDURE Send@3();
VAR
Result@1000 : Text[1024];
BEGIN
WITH SMTPMailSetup DO
Result :=
Mail.Send(
"SMTP Server",Authentication <> Authentication::Anonymous,"User ID",Password,"SMTP Server Port");,"SMTP Server Port");
Mail.Dispose; // Add this line that begians with 10 spaces.
CLEAR(Mail);
IF Result <> '' THEN
ERROR(Text003,Result);
END;
http://gotcal.com/index.php/2010/08/att ... eunit-400/
Thanks in advance,
Tim
Just in relation to this problem:
viewtopic.php?f=23&t=48012&hilit=smtp+attachment
I still have this locking problem with version 7.3.0.1 of the component and I use the Dispose command straight after the .Send command and it sending successfully
The below links highlight the same issue, but it still locks for me. Has anyone else seen this problem persist?
NAV build 6.00.35003
To keep it in simple form, the code is like this:
....
l_autMail.AddAttachments('c:\temp\Licence ' + l_recSH."No." + '.pdf');
l_txtResult := l_autMail.Send(l_recSMTPSetup."SMTP Server", 25, FALSE, '', '', FALSE);
l_autMail.Dispose;
IF NOT ERASE('c:\temp\Licence ' + l_recSH."No." + '.pdf')THEN;
ERROR('Error on delete');
.....
https://mbs2.microsoft.com/Knowledgebas ... %242280492
MIcrosoft says to add in the new Dispose line:
PROCEDURE Send@3();
VAR
Result@1000 : Text[1024];
BEGIN
WITH SMTPMailSetup DO
Result :=
Mail.Send(
"SMTP Server",Authentication <> Authentication::Anonymous,"User ID",Password,"SMTP Server Port");,"SMTP Server Port");
Mail.Dispose; // Add this line that begians with 10 spaces.
CLEAR(Mail);
IF Result <> '' THEN
ERROR(Text003,Result);
END;
http://gotcal.com/index.php/2010/08/att ... eunit-400/
Thanks in advance,
Tim
0
Comments
-
I'm so stupid, there was a colon in the way - coincidence. Solved0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions