SMTP Mail error

ben5000
Member Posts: 110
Hi experts 
I get the following error when trying to send an email from Nav Classic Client (v5)
Here is the code I use (where SMTPMail is CU400 = "SMTP Mail") :
The fact is that the same code works on the NAS but not on my client.
So I taught the Automation Server was not correctly registered.
But when using debugger shows that the error rises when calling the automation variable Mail.Send()
Moreover the Automation server is listed in the Automation Server table.
I've searched in the forum but found nothing.
I restarted my computer to refresh the registry.
I tried to declare a new Mail automation variable in CU 400.
Nothing solved my problem. So could you advise please?
Many thanks for your help!

I get the following error when trying to send an email from Nav Classic Client (v5)
Microsoft Dynamics NAV
This message is for C/AL programmers:
Could not invoke the member Send. The OLE control or Automation server returned an unknown
error code.
OK
Here is the code I use (where SMTPMail is CU400 = "SMTP Mail") :
SMTPMail.CreateMessage('John Doe', 'john.doe@contonso.com', 'pamela@microsoft.com', 'Mail title', 'This is the body of the mail', FALSE); SMTPMail.Send(); END;
The fact is that the same code works on the NAS but not on my client.
So I taught the Automation Server was not correctly registered.
But when using debugger shows that the error rises when calling the automation variable Mail.Send()
Moreover the Automation server is listed in the Automation Server table.
I've searched in the forum but found nothing.
I restarted my computer to refresh the registry.
I tried to declare a new Mail automation variable in CU 400.
Nothing solved my problem. So could you advise please?

Many thanks for your help!
0
Comments
-
Does your system have permissions to use the SMTP server? Maybe relaying is switched off.0
-
Hi Mark,
SMTP service is running.
There is nothing in the event viewer.0 -
Troubleshooting SMTP can be a nightmare.
It is most likely a permission thingy.
Have you tried other SMTP tools? Can you send emails via SQL Mail? That uses SMPT too. You can also try the SMTP download here on Mibuso, which sometimes gives better error messages.
AFAIK the Microsoft SMTP is based on .NET, the Mibuso SMTP is based on OCX.0 -
Hi
We have had this error before and it was definitely a permission issue. If relay has been activated on Exchange, it could have something to do with roaming IP's.0 -
Hi,
what is your client version?
Microsoft has released a hotfix, KB2499881, for the SMTP "features" in NAV. However this hotfix is only for 2009SP1 and R2. The new set of dll's actually returns the correct error messages and will allow you to set the port and use SSL.
I have to say that I've had good experiences with this hotfix. It actually makes SMTP work better.
I hope this helps,
Regards,
WillyFostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.0 -
Thanks for all your replies
I'll investigate the permission issue with the internal IT Admin next week.
I'll keep you informed!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