i am using MBS CURL(S) to send Mails from Macintosh and Windows Machines. Mails sent from a Macintosh (Mavericks) by using the following code, are fine. Mails sent from Windows Machines with the same code are missing most linebreaks. It looks like multiple linebreaks are replaced by single linebreaks. I assume it has something todo with the Encoding or with the kind of EndOfLines, but i can’t find a solution by myself.
[code] // we store stuff in variables here to avoid the ThreadAccessingUIException
Strange is. I load the Text for the Body from a mySQL Database (as WindowsANSI) into a TextArea and it fails. But if i enter the text manually into my TextArea, it works just as expected?
Here is an example of an original text as it’s copied from the Database into the TextArea:
[code]Sehr geehrte Kundin, sehr geehrter Kunde,
vielen Dank für Ihre Anfrage.
Wir haben Ihre Nachricht erhalten und werden uns falls erforderlich, in Kürze mit Ihnen in Verbindung setzen.[/code]
and this is how it looks like in the received Mail:
Sehr geehrte Kundin, sehr geehrter Kunde,
vielen Dank für Ihre Anfrage.
Wir haben Ihre Nachricht erhalten und werden uns falls erforderlich, in Kürze mit Ihnen in Verbindung setzen.
Same issue.
BTW: The debugger shows that em…Text holds the String as it should be, but somehow it must “loose” information in CURL when the text has been written and sent from a Windows (7 32Bit) machine.
I am sure it is related to the encoding. I am now using the following code, but still have the same issue:
[code] Dim em as new EmailMessage
Dim BetreffText,BodyText As String
BetreffText = Betreff.Text
BodyText = Nachricht.Text
BetreffText = BetreffText.ConvertEncoding(Encodings.WindowsLatin1)
BodyText = BodyText.ConvertEncoding(Encodings.WindowsLatin1)
Thank you Christian for your kind help.
I think i will leave it as it is for a while and continue with other parts of my project until i have the time for another try
After further research I found out, the double line breaks when they are written on a Macintosh are not filtered out in an email client. But if i send the same mail from a Windows machine, these extra line breaks are actually filtered out by the mail client.