The email message body is incorrect when you create an email message by using the AppendBody method in Microsoft Dynamics NAV 2009 Service Pack 1

This article applies to Microsoft Dynamics NAV for all countries and all language locales.

Symptoms

Assume that you apply hotfix 981354 and hotfix 2280492 in Microsoft Dynamics NAV 2009 Service Pack 1 (SP1). When you use the AppendBody method in version 7 of the Microsoft.Navision.Mail assembly to create an email message and the message body has umlaut and special characters, the message body is converted incorrectly.
For more information about hotfix 981354 and hotfix 2280492, click the following article numbers to view the article in the Microsoft Knowledge Base:
981354 You cannot change the default port for SMTP assignment in Microsoft Dynamics NAV
2280492 Attachments are not released until the Microsoft Dynamics NAV client is closed when you use the SMTP Mail codeunit (400) to send email messages that have attachments

Resolution

Hotfix information

A supported hotfix is available from Microsoft. There is a "Hotfix download available" section at the top of this Knowledge Base article. If you are encountering an issue downloading, installing this hotfix, or have other technical support questions, contact your partner or, if enrolled in a support plan directly with Microsoft, you can contact technical support for Microsoft Dynamics and create a new support request. To do this, visit the following Microsoft Web site: You can also contact technical support for Microsoft Dynamics by phone using these links for country specific phone numbers. To do this, visit one of the following Microsoft Web sites:

PartnersCustomersIn special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to any additional support questions and issues that do not qualify for the specific update in question.




How to obtain the Microsoft Dynamics NAV hotfix or update files

After you request a Microsoft Dynamics NAV hotfix, a hyperlink will be sent to you in an e-mail.


The e-mail will contain a hyperlink and a password. You can use the hyperlink to download the Microsoft Dynamics NAV hotfix or the update files. When you click the hyperlink, the File Download – Security Warning dialog box opens. Then, you are prompted to run, to save, or to cancel the download.


If you click Run, the files start the download and the extraction process. You must specify a folder for the new files, and then provide the password.


If you click Save, you must specify a path for saving the compressed file. When you open the file that you saved, you are prompted to specify a path for the files. Then, you must provide the password provided in the e-mail.


If you click Cancel, the download process stops.


.

File information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
File nameFile versionFile sizeDateTimePlatform
Microsoft.navision.mail.dll7.2.0.026,48005-Dec-201015:50x86
Microsoft.navision.mail.tlbNot applicable3,61205-Dec-201009:26Not applicable

To resolve this problem, follow these steps:
  1. Copy the files that you extracted from the hotfix files to the following folder:
    C:\Program Files\Common Files\Microsoft Dynamics NAV\Mail
  2. Register the new Navision.Mail.dll assembly in the following folder:
    regasm /codebase /tlb:Navision.Mail.tlb Navision.Mail.dll
  3. Add column 6 in the SMTP Mail Setup table(409) as follow:
    ...
    { 6 ; ;SMTP Server Port ;Integer ;InitValue=25; }
    ...
  4. Add the SMTP Server Port field in the SMTP Mail Setup form(409) as follow:
    ...
    { 14 ;TextBox ;3850 ;1540 ;5500 ;440 ;Name=<SMTP Server Port>;
    ParentControl=1;
    InPage=0;
    DecimalPlaces=0:0;
    NotBlank=Yes;
    Numeric=Yes;
    SourceExpr="SMTP Server Port";
    MinValue=1 }
    { 15 ;Label ;440 ;1540 ;3300 ;440 ;ParentControl=14; }
    ...
  5. Change the code in the SMTP Mail codeunit(400) as follows:
    Existing code 1
    ...
    Mail@1000 : Automation "{68AEAA7B-9523-3511-AF5F-F2381D2C6F04} 1.0:{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}:'Microsoft Navision Mail'.SmtpMessage";
    ...
    Replacement code 1
    ...
    Mail@1000 : Automation "{68AEAA7B-9523-3511-AF5F-F2381D2C6F04} 7.2:{F9DAE2A4-D2F8-37C3-86D5-E4FFE166D860}:'Microsoft Navision Mail'.SmtpMessage";
    ...


    Existing code 2
        PROCEDURE Send@3();
    VAR
    Result@1000 : Text[1024];
    BEGIN
    WITH SMTPMailSetup DO
    Result :=
    Mail.Send(
    "SMTP Server",Authentication <> Authentication::Anonymous,"User ID",Password,"SMTP Server Port");
    CLEAR(Mail);
    IF Result <> '' THEN
    ERROR(Text003,Result);
    END;
    Replacement code 2
        PROCEDURE Send@3();
    VAR
    Result@1000 : Text[1024];
    BEGIN
    WITH SMTPMailSetup DO
    Result :=
    Mail.Send(
    "SMTP Server",Authentication <> Authentication::Anonymous,"User ID",Password,"SMTP Server Port");
    Mail.Dispose;
    CLEAR(Mail);
    IF Result <> '' THEN
    ERROR(Text003,Result);
    END;

Prerequisites

You must have Microsoft Dynamics NAV 2009 Service Pack 1 installed to apply this hotfix.

Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

More Information

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 2479702 - Last Review: Jan 31, 2017 - Revision: 3

Microsoft Dynamics NAV 2009

Feedback