Download & Extend

Bad Reply-To: and From: fields in emails

Project:Webform
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I've posted my first submission and got ugly emails with fields like:

Reply-To: =?UTF-8?B?Ij0/VVRGLTg/Qj8wSnZRc05DMzBMWFJnTkM5MFl2UXRTRFFzZEMrMExnZzBMSWc=?=
=?UTF-8?B?MEp6UXZ0R0IwTHJRc3RDMUlOQzRJTkNmMEw0PT89CiA9P1VURi04P0I/MExUUXY=?=
=?UTF-8?B?TkMrMFlIUXV0QyswTExSak5DMT89IiA8aW5mb0ByZXZvbHRlci5ydT4=?=

From: =?UTF-8?B?Ij0/VVRGLTg/Qj8wSnZRc05DMzBMWFJnTkM5MFl2UXRTRFFzZEMrMExnZzBMSWc=?=
=?UTF-8?B?MEp6UXZ0R0IwTHJRc3RDMUlOQzRJTkNmMEw0PT89CiA9P1VURi04P0I/MExUUXY=?=
=?UTF-8?B?TkMrMFlIUXV0QyswTExSak5DMT89IiA8aW5mb0ByZXZvbHRlci5ydT4=?=

Using GMAIL.

Comments

#1

Hmm, the senders and reply-to is UTF-8 encoded. gMail should be smart enough to unencode them for you. I'll take a look and see if I get similar results with my gMail account.

#2

When sending emails to gMail, I can't reproduce the problem. Here's a screenshot of a received email through webform to a gMail account (email addresses blurred out).

AttachmentSize
Picture 5.png 37.56 KB

#3

Checking my email through my local mail application, the headers in raw form are:

Subject: =?UTF-8?B?w6ltYcOubCB3aXRoIGZ1bm7CpSDDp2jDpXJhY+KAoGVycw==?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal Webform (PHP/5.2.4)
Errors-To: nate@example.org
Reply-To: "=?UTF-8?B?bsOldGjDpW4gaGHDvGc=?=" <nate@example.com>
From: "=?UTF-8?B?bsOldGjDpW4gaGHDvGc=?=" <nate@example.com>

Which when viewed in the normal mode are properly decoded.

#4

I get some similar "ugly content." Please see attached screenshot and advise of change I need to make.

I get extra html tags that seem like they shouldn't be part of the email form and other people than me as the admin read this form so they may get confused by all of the html tags.

AttachmentSize
form output.jpg 340.65 KB

#5

Status:active» closed (fixed)

Closing as I never got a response back from OnkelTem. tqsenkungu, yours sounds like a different problem, read up on this issue which seems to be the same as yours http://drupal.org/node/242773

#6

Version:5.x-2.x-dev» 6.x-2.3

Hi...

I get the same header-characters with Drupal 6.4 an Webform 6.x.2.3

"=?UTF-8?B?SU5URVJOIC0gSVNWIERFVksgLSBJbnRlcmVz@sub.domain.com, c2VuZ2VtZWluc2NoYWZ0IFNlbGI=?= =?UTF-8?B?c3Rzd@sub.domain.com, MOkbmRpZ2VyIFZlcnNpY2hlcnVuZ3NrYXVmbGV1dGUgZGVy@sub.domain.com, IERFVksgZS4=?= =?UTF-8?B?IFYu?=" @sub.domain.com

There is no need to post the email to a GMail-Account.

#7

Status:closed (fixed)» active

Hi,

Same problem here...

Any ideas?

#8

Just to add that I don't have Mime Mail installed...

Please, is there any solution for this? I love this module but emails look really ugly!

Leo

#9

leo.ruffini, could you answer a few more questions about this (thanks for the note about MIME mail).

- Do the e-mails get delivered to the correct address?
- What e-mail client are you using? (Version and OS helpful also).
- Anything else malformed in the e-mail or is it just the headers?

Encoding of headers is a universal, cross-platform solution for adding special characters to email headers, since the email format does not support anything other than ASCII in the headers. Your e-mail client should automatically decode the headers when displaying, though of course if you look at the raw headers they're still going to be encoded.

It's also interesting to note that these headers are only encoded *if necessary*. Which means you're receiving special characters in that particular e-mail your receiving, which would be undeliverable if it weren't encoded (or alternatively, Webform would strip out the invalid characters, which would also be very bad).

So the UTF8 encoding of special characters in Webform isn't going anywhere, but if there's something wrong about it, ofcourse I'd like it to be fixed. However from what I can tell, everything is working as it should.

For more information:
http://www.rfc-editor.org/rfc/rfc2047.txt
http://api.drupal.org/api/function/mime_header_encode/6

#10

Version:6.x-2.3» 5.x-2.3

I was about to make a new case but why not here?
I have this exact same problem described by OnkelTem. I don't have mime mail installed.

As soon as I setup my server with postfix, webform was able to send emails, but with this problem mentioned.
So I thought, if I install the SMTP module maybe I could change that nasty code from the email adress. Then the SMTP module test would be able to send an email from a recipient that now looks nice, BUT webform now is not able to send emails, some messages are stored in watchdog that says:

Error sending e-mail from "=?UTF-8?B?RGl2aXNpw7NuIGRlIENpZW5jaWFzIGRlIGxhIENvbXVuaWNhY2nDs24geSBEaXM=?= info@mydomain to user@usermail: The following From address failed: "=?UTF-8?B?RGl2aXNpw7NuIGRlIENpZW5jaWFzIGRlIGxhIENvbXVuaWNhY2nDs24geSBEaXM=?= info@mydomain

I have also tried a webform_auto_responder module from someone around. It's also unable to send email with a message in watchdog like this: Error finding recipient email. Was an email recipient field chosen?

Of course the webform has a valid email address as well as a field checked with conditinal response to send a copy to the email a user enters.

I'm talking about 2 problems, either one that gets a solution would be great! Either I disable SMTP module and fix the nasty UTF8 code or get webform to work with SMTP module.

Help appreciated!
Thank you!

#11

Sorry for the late reply. The problem suddenly disappeared. The most strange of it is that the ISP swear they haven't done anything.
Anyway, I found out that they are using linux and qmail.
The only malformed info were the headers.
Leo

#12

Well, this is interesting. So I supposed it's just because the sender's name has accents so I went to the configuration fields of Webform and changed the name of the sender, which had accents, to something simple and now the mail is sent nicely! I don't know if the mail server has some fault on it, but I think something could be done to make Webform manage this so that we can use accents on the name of the sender.

Other stuff I would appreciate to be done is related with the SMTP module. I disabled SMTP module to be able to send mails with Webform, but now my Postfix server is not using an authenticated user to send mail. By now I'm behind a firewall and sending mails from localhost only, so is not a big deal, but who knows after.

I'm using Drupal 5.7 and Webform 2.3.

#13

Category:bug report» support request
Status:active» fixed

Well as noted in #9, I believe everything is operating properly. UTF8 encoded headers are a completely standard encoding, so if you're experiencing this issue, I recommend trying a different e-mail client or contacting your hosting provider.

#14

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#15

Version:5.x-2.3» 6.x-2.x-dev
Status:closed (fixed)» active

i have the same issue but found something:

the weird FROM and REPLY addresses only show up, when the SENDER EMAIL is set in the webform itself. When you choose an input field as SENDER ADDRESS the mail just looks normal.

does this help and can it be fixed? i check the server config, but did not find anything unusual and my clients are kind of annoyed by the ?UTF-8?B?Ij0/VVRGLTgQj8wSnZRc05DMzBMWFJnTkM5MFl2UXRTRFFzZEMrMExnZzBMSWc=?=
=?UTF-8?B?MEp6UXZ0R0IwTHJRc3RDMUlOQzRJTkNmMEw0PT89CiA9P1VURi04P0I/MExUUXY=?=
=?UTF-8?B?TkMrMFlIUXV0QyswTExSak5DMT89IiA8aW5mb0ByZXZvbHRlci5ydT4=?= SENDER ADDRESSES

:)

thanks for helping!

#16

Status:active» closed (fixed)

Per #9, this is correct behavior.

nobody click here