zend-mail
zend-mail copied to clipboard
Mail recepients with German umlaut are not accepted
This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html
Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7654 User: @renecatharsis Created On: 2015-12-21T12:08:38Z Updated At: 2016-02-13T15:34:02Z Body 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:
#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:
https://github.com/zendframework/zf2/issues/7501
Update:
Seems like RFC6531 was implemented in zend-validate but not yet zend-mail.
---
That's because this is not possible without support for SMTPUTF8 from RFC 6581. UTF-8 in headers and body are handled using 8BITMIME, but that has no bearing on the SMTP layer.
This repository has been closed and moved to laminas/laminas-mail; a new issue has been opened at https://github.com/laminas/laminas-mail/issues/57.