Forum Replies Created
thanks! I successfully uploaded the new version. Including the UTF-8 encoding in $header is a good idea. Before this modification we had observed that some messages were fine, others had errors. This may have been due to the device (Mac, PC, smartphone…) that the individual visitor of the website had used. Now, it seems pretty good… I tested it by sending messages from different devices to different email addresses and reading these emails with different mail clients. The problem seems to be resolved.
Two final points…
First, I was confused by the fact that the messages were displayed incorrectly (even now) when I looked into my gmx-account (IMAP) via different browsers. The mail clients, however, that download the messages from the gmx server displayed the messages correctly. No, I do not want to talk with gmx about the encoding of their webmail interface ;-). But it shows that testing such problems can be complicated.
Second, I noticed that the [contact] shortcut in the Trattoria theme sends the email to the address given in WordPress-Settings-General-Email address which is marked as “Only used for administrative purposes”. The email address given in Design-Theme options-Contact Page is simply ignored. Is this a feature or a bug?
Yes, I know how to do that. You have my email address?
Thank you very much for your help!
I have to be careful when updating the theme at a later stage, right?
Anyway… thanks again.
I just contacted my hosting company for the domain/email server. They responded
The Emails that are sent from the contact form are not encoded with UTF-8. This is the reason that some letters (so called “Umlaute”) are not displayed correctly. The
UTF-8 encoding is used for the website, however, this must be added to wp-mail.php as well.
To change the encoding to UTF-8 it is sufficient to give the value in the following way
$charset = ‘UTF-8’;
Right now, it has the value
$charset = ”;
Our mail server simply use the encoding provided by the sender of the message, in your case the encoding of the contact form. A change of the encoding by our mail server is not possible.”
I think, that part of their response is nonsense. The $charset = ”; in wp-mail.php is simply a default value before the encoding is derived from the message.
However, there still remains the question where the non-UTF-8 encoding is coming from. I watched the incoming message to my mail server… and the message was not UTF-8 encoded.
… there must be some problem with the contact form and the way the message is sent …
thanks for your feedback, this helps very much.
So if the mail provider would be the problem, then the same problem should occur for any mail sent to the corresponding email address. In fact, we are sending the messages of the form to an email address at the same domain. So I have to check the mail settings of this domain.
Thanks again! I think this points to the right direction… otherwise there would be many users of your themes with the same problem.
of course, it must be
Any news on this problem? I gave you some days ;-).
While searching for a solution I came across some hints that many contact forms use WordPress methods in “inclass-phpmailer.php” in “/wp-includes”. So it may depend on whether
public $CharSet = ‘iso-8859-1’;
is set correctly. Or do you override this setting with a utf-8 charset at some other place?
Thanks in advance