-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail recepients with German umlaut are not accepted #67
Comments
AFAIK umlauts are not allowed in an email address (yet). The current accepted standard is RFC 2822 and non ASCII characters are not allowed in the local-part there. Non ASCII characters are proposed in RFC 6531. But this is still markes as PROPOSED STANDARD and was not implemented in Originally posted by @BreyndotEchse at zendframework/zend-mail#49 (comment) |
I'm using v2.5.3 as well. Running on a Win7 x64 with PHP7.0.0 wampstack, if that helps. Originally posted by @renecatharsis at zendframework/zend-mail#49 (comment) |
Oh. You're right. Intl was not loaded in my test environment. I have looked up RFC 6531, 6530, 5336, 5891 and 5890 and could not find any reference that the local-part could be converted to IDN ASCII. Actually there are some hints that the local-part SHOULD NOT be converted. RFC 5891:
(https://tools.ietf.org/html/rfc5891#section-3.2.2) RFC 6530:
(https://tools.ietf.org/html/rfc6530#section-1) IMO the behavior in zend-validator is wrong. However google gave me some results of people claiming that some email providers actually support IDN converted local-parts. Let's ask @svyatoslav-kubakh who implemented IDN (zendframework/zendframework#7281). Maybe he can give us more information on this. Originally posted by @BreyndotEchse at zendframework/zend-mail#49 (comment) |
For German umlaut you need to set |
I also came across this issue. While I am aware of the rules of the RFC, the current behaviour is not consistent. An e-mail address with accents returns true for The Is now only manual/additional validation the way to go? There is a mention of this in the validator: laminas/laminas-validator#7 and it looks like this issue is with the |
Cloned this from zf2 issue repository for correct assignment to zend-mail:
zendframework/zendframework#7654
Hi,
since ZF v2.4.x, I cannot send any mails to recepients containing German umlauts in their mail address.
For exmaple: testäöü@gmail.com
Encoding is set to UTF-8 on Zend\Mail\Message object.
The following expection is thrown:
Invalid header value detected #0 foobar\vendor\zendframework\zend-mail\src\Header\AbstractAddressList.php(114): Zend\Mail\Header\HeaderValue::assertValid('test\xC3\xA4\xC3\xB6\xC3\xBC@gmai...') #1 foobar\vendor\zendframework\zend-mail\src\Header\AbstractAddressList.php(158): Zend\Mail\Header\AbstractAddressList->getFieldValue(true) #2 foobar\vendor\zendframework\zend-mail\src\Headers.php(422): Zend\Mail\Header\AbstractAddressList->toString() #3 foobar\vendor\zendframework\zend-mail\src\Transport\Smtp.php(332): Zend\Mail\Headers->toString() #4 foobar\vendor\zendframework\zend-mail\src\Transport\Smtp.php(238): Zend\Mail\Transport\Smtp->prepareHeaders(Object(Zend\Mail\Message)) #5 foobar\vendor\Solar\library\Solar\Mail\Mail.php(144): Zend\Mail\Transport\Smtp->send(Object(Zend\Mail\Message)) #6 foobar\vendor\Solar\library\Solar\Client\AbstractClient.php(249): Solar\Mail\Mail->sendSmtp('processrevenuec...', Array, true, '') #7 foobar\modules\eonde\Processrevenuecheck.php(73): Solar\Client\AbstractClient->sendMail('test\xC3\xA4\xC3\xB6\xC3\xBC@gmai...', '', Array) #8 foobar\vendor\Solar\library\Solar\Bootstrap\Bootstrap.php(248): modules\eonde\Processrevenuecheck->run() #9 foobar\index.php(80): Solar\Bootstrap\Bootstrap->getResponse() #10 {main}
Umlauts work fine with the subject and body.
Also, the value passes the \Zend\Validate\EmailAddress validator.
It might be related to this issue although I cannot gain any workaround from it:
zendframework/zendframework#7501
Update:
Seems like RFC6531 was implemented in zend-validate but not yet zend-mail.
Originally posted by @renecatharsis at zendframework/zend-mail#49
The text was updated successfully, but these errors were encountered: