CU400 sends special Characters to Hotmail, Gmail etc.

hawkeyehawkeye Member Posts: 51
My client Running 2009 R2 has trouble sending emails with attachments to for example hotmail and gmails but not to xxx@[company].com mails.

The subject and name of the attachments is strange characters looking like Chinese or something. In the overview list, the subject looks fine, but when you open the male noone can read it.

My client is using some Partner-created PDF-mailmodule using Amyuni PDF-converter and CU 400.

It worked fine until a few months ago where the hosting partner changed the server.

On Partnersource I found the following, changing the maiul.dll og tlb, but that did not help.

https://mbs2.microsoft.com/Knowledgebase/KBDisplay.aspx?scid=kb%3bEN-US%3b2516144

What to do.... Anyone?

Br

Hawkeye

edit: My client is running Classic only

Answers

  • vaprogvaprog Member Posts: 1,140
    edited 2016-01-07
    I'd guess the differences are caused by differences in resilience toward an incorrectly encoded mime message.

    I suggest you capture the sent mime message and check it for errors. Once you have identified the flaw, it will be easier to to find a fix, either by changing your code or by updating involved components.

    One way to capture the message is a local smtp server dummy like smtp4dev.
    One way to find flaws is an online mime message validator like Message Lint
  • hawkeyehawkeye Member Posts: 51
    Thanks - it seems like the trouble is about the UTF-16 formating.

    How can I control that. If I could only send the message as plain text, I guess it would work, but the mail-automation does not have that kind of property.

    btw. I tried without an attached PDF with no luck, but atleast I now know that the Amyuni driver is not the issue
  • hawkeyehawkeye Member Posts: 51
    I did the following Code in the Function Send in CU 400.

    I tried all combinations of the CREATE - function. I tried with HtmlFormatted TRUE and FALSE

    All was with Chinese characters in the subject and in the send-from email.

    Conclusion: This is not an NAV issue, this has to be a automation Issue or a SMTP-server problem.

    IF USERID = '[MY USERID]' THEN BEGIN
    CLEAR(Mail);
    IF ISCLEAR(Mail) THEN
    CREATE(Mail,TRUE,FALSE);
    Mail.HtmlFormatted := TRUE;
    Mail.FromName := 'THIS IS A TEST';

    Mail.FromAddress := 'noreply@XXXXXX.XX';
    Mail."To" := '[MY HOTMAIL]';
    Mail.Subject := 'TEST';
    Mail.Body := 'THIS IS THE BODY' ;
    WITH SMTPMailSetup DO
    Result :=
    Mail.Send("SMTP Server",
    "SMTP Server Port",
    Authentication <> Authentication::Anonymous,
    "User ID",
    Password,
    "Secure Connection");

    Mail.Dispose;
    CLEAR(Mail);
    EXIT;
    END;
Sign In or Register to comment.