Options

SMTP Mail Problems

GrantGrant Member Posts: 30
I am using the "SmtpMailXControl1.ocx" control dated 10/08/02. We have other customers who are using this OCX control with no problem. However, one customer is getting the following error and we just can't seem to get around it:

This message is for C/AL programmers:
The call to member Send failed. SmtpMailXControl1.SmtpMailX returned the following message:
Die Authentifizierung ist fehlgeschlagen

I have created a simple form to test the SMTP send capability. On my system this works great, but our customer still gets the error.
IF ToRecipient = '' THEN BEGIN
  MESSAGE('Please enter valid email recipient.');
  EXIT(FALSE);
END;

IF SMTPServerName = '' THEN BEGIN
  MESSAGE('Please enter valid SMTP Server Name.');
  EXIT(FALSE);
END;

IF SMTPServerUserID = '' THEN BEGIN
  MESSAGE('Please enter valid SMTP Server User ID.');
  EXIT(FALSE);
END;

CLEAR(SMTPMail);
SMTPMail.NewMessage(FromEmailAddress,Subject);
SMTPMail.SetWorkMode();
SMTPMail.SetHost(SMTPServerName);
SMTPMail.SetUserID(SMTPServerUserID);
SMTPMail.AddLine(BodyLine1);
SMTPMail.AddLine(BodyLine2);
SMTPMail.AddLine('                        ');
SMTPMail.AddLine('Testing SMTP Notifications');
SMTPMail.AddLine('                        ');
SMTPMail.AddLine('TEST: SMTP ServerName, SMTP User ID');
SMTPMail.AddLine(SMTPServerName + ', ' + SMTPServerUserID);
SMTPMail.SetToAdress(ToRecipient);
SMTPMail.SetFromAdress(FromEmailAddress);
SMTPMail.Send;

IF NOT SMTPMail.WasSuccessful THEN BEGIN
  MESSAGE(SMTPMail.LastError);
  EXIT(FALSE);
END ELSE
  EXIT(TRUE);

Some steps we have taken to debug are:

1. Verify the SMTP Server Name and Server ID. Used telnet to connect directly to the SMTP server and trigger an email to himself from that address. I realize this does not involve the SMTP OCX control, but it verifies that these parameters are correct.

2. Have tried both the fully resolved server name "exchange1.1234c.local" as well as the abbreviated name "exchange1". Same problem.

3. Have verified that the license file "SmtpMailXControl1.lic" is in the installation directory.

I'm running out of ideas, any help would be appreciated.

Comments

  • vikram7_dabasvikram7_dabas Member Posts: 611
    tell to ur client that install the ocx then use it .i think that then it will work smoothly.please mail me personally on my id vikram7_dabas@yahoo.co.if it is not working and when u find the right solution.
    Vikram Dabas
    Navision Technical Consultant
  • GrantGrant Member Posts: 30
    It was solved, thanks for the offer to help.

    Turns out that the "SMTP User Id" setting was the problem. They never actually did try setting this to "userid" instead of "userid@hotmail.com". I assumed they had already tried this and that it didn't help.
Sign In or Register to comment.