Contact form send base64 encoded message
Permalink
Hi all,
I set up a contact us form on a site I'm woring on and the email that comes from the form is still base64 encoded, how do I fix this? The contents of the email is below:
I set up a contact us form on a site I'm woring on and the email that comes from the form is still base64 encoded, how do I fix this? The contents of the email is below:
Content-type: text/plain; charset=UTF-8 From: email@address.com Mime-Version: 1.0 Content-Transfer-Encoding: BASE64 ClRoZXJlIGhhcyBiZWVuIGEgc3VibWlzc2lvbiBvZiB0aGUgZm9ybSBDb250YWN0IEZvcm0gb24g dGhyb3VnaCB5b3VyIENvbmNyZXRlNSB3ZWJzaXRlLgoKQ29tcGFueQ0KdGVzdA0KDQpTdXJuYW1l DQpLZWxseQ0KDQpGaXJzdCBOYW1lDQpOYXRoYW4NCg0KU3RyZWV0IEFkZHJlc3MNCnRlc3QNCg0K cG9zaXRpb24NCnRlc3QNCg0KU3VidXJiDQp0ZXN0DQoNClN0YXRlDQpOU1cNCg0KUG9zdGNvZGUN CjIyNTENCg0KUGhvbmUNCjAyNDM2MzE2MDENCg0KRmF4DQoNCg0KSSBhbSBhOw0KT3duZXIvRGV2 ZWxvcGVyDQoNCkkgYW0gZW5xdWlyaW5nIGFib3V0Ow0KQ3VycmVudCBQcm9qZWN0DQoNClByb2pl Y3QgVHlwZTsNCkludGVyaW9yL0ZpdG91dA0KDQpEZXRhaWxzICYgQ29tbWVudHM6DQoNCg0KRW1h aWwNCm5hdGhhbkBuYXRoYW4ta2VsbHkuY29tDQoNCkkgd291bGQgbGlrZSB0byByZWdpc3RlciBm b3IgTEHigJlzIHByb2plY3QgbmV3c2xldHRlcg0KeWVzDQoNCkkgaGF2ZSByZWFkIGFuZCB1bmRl cnN0YW5kIExB4oCZcyBQcml2YWN5IFBvbGljeQ0KWWVzDQoNCgoKVG8gdmlldyBhbGwgb2YgdGhp cyBmb3JtJ3Mgc3VibWlzc2lvbnMsIHZpc2l0IGh0dHA6Ly9sYWcyLm5hdGhhbi1rZWxseS5jb20v
Viewing 15 lines of 16 lines. View entire code block.
This used to work fine for me but it looks that a customer of mine has the exact same problem.
It makes sense to use mb_* since a lot of people, especially those outside of the states, needs some fancy letters like ïèöä.
Isn't there a solution without removing mb_*?
An email function should be rock solid... I suggest we take a bit more time to find a solution that works everywhere.
It makes sense to use mb_* since a lot of people, especially those outside of the states, needs some fancy letters like ïèöä.
Isn't there a solution without removing mb_*?
An email function should be rock solid... I suggest we take a bit more time to find a solution that works everywhere.
Hey Nathan,
I just realized that someone already found a few bugs there. See this disucssion:
http://www.concrete5.org/index.php?cID=10270...
I'm using 5.3.0 on this site. This issue might have been fixed in newer versions.. Which one are you using?
I just realized that someone already found a few bugs there. See this disucssion:
http://www.concrete5.org/index.php?cID=10270...
I'm using 5.3.0 on this site. This issue might have been fixed in newer versions.. Which one are you using?
I'm currently running 5.3.1.1 but I'm running the modified version that is using the $c5 jquery hack so I'm trying to be very careful about what issues I post as bugs etc just in case my hack are the cause, so far though this is the only issue I've had and now that you found the other post it's clearly not due to my hack.
I'll check it out and see if the solutions there have any luck, I agree my solution wasn't exactly a solution but with my deadline well past due it was a quick and dirty fix for now.
I'll check it out and see if the solutions there have any luck, I agree my solution wasn't exactly a solution but with my deadline well past due it was a quick and dirty fix for now.
The solution in the post you linked fixed the issue, that's a much better solution than removing mb_.
if (function_exists('mb_encode_mimeheade')) {
$subject = mb_encode_mimeheader($subject, APP_CHARSET);
}
if (function_exists('mb_send_mail')) {
mb_send_mail($to, $subject, $this->body, $header);
} else {
mail($to, $subject, $this->body, $header);
}