My SMTP is rusty, but this seems to work without any special tricks.
xdmp:email(
<em:Message
xmlns:em="URN:ietf:params:email-xml:"
xmlns:rf="URN:ietf:params:rfc822:">
<rf:subject>test email</rf:subject>
<rf:from>
<em:Address>
<em:name>XXX</em:name>
<em:adrs>XXX</em:adrs>
</em:Address>
</rf:from>
<rf:to>
<em:Address>
<em:name>XXX</em:name>
<em:adrs>XXX</em:adrs>
</em:Address>
</rf:to>
<em:content>
This text has a diacritic: Kölsch
</em:content>
</em:Message>)
The umlaut displays correctly in my mailer. However this relies on the mailer
to default to UTF-8, and some environments may still be set to default to
ASCII, CP1252, etc. So to be on the safe side I would add something like
<rf:content-type>text/plain; charset=utf-8</rf:content-type> to the headers -
substituting whatever mime type you wish to use, of course.
-- Mike
On 14 Jul 2013, at 17:39 , "Tim" <[email protected]> wrote:
> Hi Folks,
>
> How can I send UTF-8 encoded characters using xdmp:email? For example, I
> want to send a string from the MarkLogic database that includes u-umlaut.
>
> Thank you!
>
> Tim Meagher
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general