mail.app attachment as symbol or within mail

Esotalk is so strange. Why do I get automatic links in the above post?

‘name’ is a valid top-level domain, so Esotalk wants to make it a link.

Hi Beatrix, i will try this.

Thank you.

Michael

I have to open this topic again.

i use this code to build a mail:

mail.Headers.AppendHeader("Content-Type", "text/plain; charset=utf-8")
mail.Headers.AppendHeader("Content-Transfer-Encoding", "quoted-printable")
mail.Subject = "=?utf-8?q?" + EncodeURLComponent(txtSubject.Text) + "?="
mail.BodyPlainText = EncodeQuotedPrintable(ConvertEncoding(TextArea1.Text, Encodings.UTF8))

After sending the Body looks fine, all special characters are correct.

But the subject looks like this:

Test%20mit%20%C3%BC%20ohne%20Anhang

Whats the best way to encode subject and body to send german umlauts with spaces in the subject?

Changing this:

mail.Subject = "=?utf-8?q?" + EncodeURLComponent(txtSubject.Text) + "?="

To this:

mail.Subject = "=?utf-8?q?" + EncodeQuotedPrintable(ConvertEncoding(txtSubject.Text, Encodings.UTF8)) + "?="

Worked fine for me.

Remember that the subject is not a URL and URL encoding will be visible on the email to the recipient. You should use EncodeQuotedPrintable for email as that is what it is made for.

before someone gets confused, lets continue this in my other topic regarding mail-encoding.

https://forum.xojo.com/20566-spaces-in-mail-subject