Topics

SendMail Charset on Magic XPA 4.6

Sébastien GT
 

Hello everybody,
I have a problem with the Mailsend function on Magic XPA 4.6.
In Development mode, everything is fine, but in Runtime, when I send the e-mail, the texts aren't correct... For example, the letter "é" becomes "é". I looked in the .INI files and I don't have lines with ANSI, OEM, Unicode, UTF-8 and charset... I have this problem for the subject and body texts.
I tried to use the functions OEM2ANSIFile, UnicodeFromANSI, UnicodeToANSI, UTF8FromAnsi, UTF8ToAnsi before to send, but it's not working.
Do you have any idea where this may come from, please?
Thank you.

Polgár Ferenc
 

I don't know XPA 4.6 but in uniPaas 1.9 there was a 'MailCharset' ini setting for this purpose.
regards
Ferenc

2020.02.12. 18:03 keltezéssel, Sébastien GROS-TABUSSIAT írta:

Hello everybody,
I have a problem with the Mailsend function on Magic XPA 4.6.
In Development mode, everything is fine, but in Runtime, when I send the e-mail, the texts aren't correct... For example, the letter "é" becomes "é". I looked in the .INI files and I don't have lines with ANSI, OEM, Unicode, UTF-8 and charset... I have this problem for the subject and body texts.
I tried to use the functions OEM2ANSIFile, UnicodeFromANSI, UnicodeToANSI, UTF8FromAnsi, UTF8ToAnsi before to send, but it's not working.
Do you have any idea where this may come from, please?
Thank you.

_._,_._,_

Sébastien GT
 

I tried to do this by setting MailCharset = UTF-8, Ansi, Unicode, but it still doesn't work.

Andreas Sedlmeier
 
Edited

Sébastien,

"é" is  "é" in UTF-8 so it might well be that your email is encoded correctly, your email reader can however not deal with the mail and thats either because it sucks (typically only US readers do, while accent country France is ok).

What you should do first: Send yourself an email and look into the "raw" email in order to be able to see the Email's SMTP/MIME headers where the encoding is specified.

Also you need to tell if you do work with Unicode for your text data, or with ANSI. There should be no need to do a codepage conversion as you do with UTF8FromANSI. Magic knows target codepage (most likely UTF-8), and Magic knows source codepage (either ANSI/Windows-1252 or Unicode). So it does the conversion automatically.

UTF-8 from Unicode would be UnicodeToAnsi(<unicode var/blb>, 65001) btw. 

Best regards,

Andreas