SMTP Error: Operation timed out

iperutilityiperutility Member Posts: 18
edited 2014-11-05 in NAV Three Tier
I'm having an issue while sending SMTP certified mail from Navision 2013.

Everytime I send a mail with the customer certified mail, the operation ALWAYS goes in timeout.
I'm not using Outlook: the operation has to go silent without external client.
Username and password are totally correct, since I can log on the account (checked it myself).
Network setup is ok too, as is the firewall: the port (465) is enabled and can send/receive.
I am using the standard 2013 SMTP codeunit, and I also debugged every line of code until the Send function: the message has correct recipients, no attachments and the correct sender address.
So, I am totally sure that everything NAV/Network part is ok.

My SMTP settings:

SMTP Server: smtps.pec.aruba.it
Base Authentication
Port 465
SSL Enabled

The server connects, no data is send/received, and the connection automatically drops after the timeout timer is reached.
Funny fact is, with NAV2009 I had to rewrite some of the SMTP function because of SSL not working, and the same address works perfectly, it can send emails from NAV without any use of external clients (outlook).
Any thoughts about this?
Mail sending without external clients is pretty vital to the product.
Thanks for your time and best regards.


  • Options
    vremeni4vremeni4 Member Posts: 323

    In my experience this usually happens when SMTP server excepts to get SSL certificate but client is sending something else. So the connection time-outs after some time as they are not on the same protocol.

    I would double check in the table 409 SMTP Mail Setup, if the flag "Secure Connection" set to True.
    Also I would try to set Authentication to NTLM.

    It may be also worth to use telnet to connect to SMTP server and find out what server expects.
    After that you can run a network sniffer on your machine to see what is NAV sending to the SMTP Server.

    I hope this helps.
  • Options
    iperutilityiperutility Member Posts: 18

    Thanks for replay me. I've tryed what You have told in the previous post, but unfortunately it didn't works. I've though to use the DotNet library of Dyanamics setuping a Global Variables

    Here below, I've wrote you my Dynamic NAV2013 function using the library DotNet System.Net.Mail.

    NB : I linked for you or someone else the explaining how set my mail SSL, the provider is Aruba.it

    Global variables :
    Name DataType Subtype Length
    SmtpClientDGA DotNet System.Net.Mail.SmtpClient.'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    MailMessageDGA DotNet System.Net.Mail.MailMessage.'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    Local variables:
    Name DataType Subtype Length
    d Text 1024
    m Text 1024
    s Text 1024
    b Text 1024
    porta Integer

    m := 'to';
    d := 'from';
    s := 'ssss';
    b := 'ddddd';

    //MailMessageDGA := MailMessageDGA.MailMessage(m,d,s,b);
    SmtpClientDGA := SmtpClientDGA.SmtpClient();
    IF EVALUATE(porta,'465') THEN BEGIN
    SmtpClientDGA.UseDefaultCredentials := TRUE;
    SmtpClientDGA.EnableSsl := TRUE;
Sign In or Register to comment.