Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending UTF-8 emails using CDO2000
Message
 
To
05/08/2021 06:50:45
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01681865
Message ID:
01682025
Views:
92
Aren't these just simple ANSI umlauts in the western code page? They should work no matter what , but I guess it depends on your CodePage that your app is running in.

I just tried sending with wwSmtp and it has no problem with upper ANSI characters. I think most likely the problem you have is not with the mail client but the character translation as FoxPro can't represent multiple charsets/codepages simultaneously. So if you're in Russian and then use a 1252 US based ANSI character those are not going to work **in FoxPro** - IOW, you're not even getting the right character into CDO regardless of whether you convert to utf-8 or not. The way to check is to print your string to the Fox console and make sure you don't get ? bad character replacements. Converting to UtF-8 doesn't help in that case because the character in FoxPro is already compromised and won't convert to UTF-8 correctly unless you are in the right code page to begin with.

Hard to tell from your description whether this is what you're describing but that's likely the problem. Basically mixing code pages in FoxPro is painful as hell.



+++ Rick ---

>For cyrillic message body I "resolved" the issue by using latin characters instead of russian ones.
>
>Some receiver e-mail addresses contain unicode characters like
>
>test@tööd.com
>
>Trying to use CDO2000 to send to those addresses throws error
>
>ERROR: :1429 # send # 213 # 0x0000020F The server rejected one or more recipient addresses. The server response was: 501 5.1.3 Bad recipient address syntax
>
>I tried
>
>
EXTERNAL PROCEDURE cdo2000.prg
>loMail = NEWOBJECT("Cdo2000", "Cdo2000.fxp")
>WITH loMail
>	SYS(3101 ,65001)
>	.cTo = strconv(cRecipients,9,  1257, 1 )
>...
>
>
>But bad recipient address error still occurss. I also tried
>
> .cCharset = 'UTF-8'
>
>and in cdo2000.prg added comprop
>
> WITH This
> .ClearErrors()
> .oCfg = CREATEOBJECT("CDO.Configuration")
>// Added
> COMPROP(.oCfg, "UTF8",1)
> .oMsg = CREATEOBJECT("CDO.Message")
>// Added
> COMPROP(.oMsg, "UTF8",1)
> .oMsg.Configuration = This.oCfg
> ENDWITH
>
>but problem persists.
>I also tried blat.dll to send email this this also throws error.
>
>How to send e-mail to address test@tööd.com from FoxPro ?
>
>Mozilla Thunderbird send e-mail to this address without issues.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform