web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to display special characters (umlaute ä/ö/ü) in a Email?

(0) ShareShare
ReportReport
Posted on by 397 User Group Leader

Does anyone have the same issue?

pastedimage1660047874680v1.png

The Email - body is created from a report via Report.SaveAs()

 TempBlobMailBody.CreateOutStream(BodyOutStream);
     Report.SaveAs(MailID, XMLParameters, ReportFormat::Html, BodyOutStream, RecRef);
         TempBlobMailBody.CreateInStream(BodyInStream);
             BodyInStream.ReadText(BodyTxt);

My settings are set to Germany/German...

Thank you.

Tom

I have the same question (0)
  • Verified answer
    T_Mauser Profile Picture
    397 User Group Leader on at

    Ok, I found the solution:

    You have to use the parameter TextEncoding::UTF8 in the Codeunit "Temp Blob" like this:

    TempBlobMailBody.CreateInStream(BodyInStream, TextEncoding::UTF8);

    Now everything works ;)

    Tom

  • ZSafar Profile Picture
    10 on at

    Hi Tom,

    it works in mail subject (Betreff) to?

    In my case it works in body but not in subject :-(

    Tnx

    Zac

  • T_Mauser Profile Picture
    397 User Group Leader on at

    Hello, I think the subject field is from Typ "Text" - Do you want to use a BLOB-Typ for the subject field?

  • ZSafar Profile Picture
    10 on at

    Hi Tom,
    tnx for the fast replay.
    I have used the same logic as for the body.
    There is the code:

    ----------------------------------------------------------
    CLEAR(TempBlob);
    TempBlob.WriteAsText(GetSubjectText(EmailDistributionSetupLine,TempDistributionEntry),TEXTENCODING::UTF8);
    TempEmailItem.Subject := GetFormattedDocumentSubjectText(TempBlob);

    --------------------------------------------------------------
    LOCAL GetFormattedDocumentSubjectText(VAR TempBlob : TEMPORARY Record TempBlob) : Text
    IF TempBlob.Blob.HASVALUE THEN BEGIN
    TempBlob.Blob.CREATEINSTREAM(InStr);
    StreamReader := StreamReader.StreamReader(InStr,Encoding.UTF8);
    EXIT(StreamReader.ReadToEnd);
    END;
    ----------------------------------------------------------------
    The funny thing is, it works at the other customer. :-)
    Maybe is the problem in customer mail server setup. I do not know... I asked him and he said that is OK.

    LG Zac

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,010

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,270 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,085 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans