SMTP Mail Codeunit Bug CU 400

ara3nara3n Member Posts: 9,256
Hello Found another bug in SMTP Codeunit

In fuction CheckValidEmailAddress

Old Code
IF NOT (
      ((EmailAddress[i] >='a') AND (EmailAddress[i] <='z')) OR
      ((EmailAddress[i] >='A') AND (EmailAddress[i] <='A')) OR     
      ((EmailAddress[i] >='0') AND (EmailAddress[i] <='9')) OR
      (EmailAddress[i] IN ['@','.','-','_']))
    THEN
      ERROR(Text001,EmailAddress);

To new code
    IF NOT (
      ((EmailAddress[i] >='a') AND (EmailAddress[i] <='z')) OR
      ((EmailAddress[i] >='A') AND (EmailAddress[i] <='Z')) OR  //Changed A to Z
      ((EmailAddress[i] >='0') AND (EmailAddress[i] <='9')) OR
      (EmailAddress[i] IN ['@','.','-','_']))
    THEN
      ERROR(Text001,EmailAddress);

The Second 'A' should be 'Z'.

The symptom is if you send an email that has capital letters it will always error out.
Ahmed Rashed Amini
Independent Consultant/Developer


blog: https://dynamicsuser.net/nav/b/ara3n

Comments

Sign In or Register to comment.