Japanese cellphone address needs to bypass RFC validation #71
Comments
So, is anyone working on this problem? Of course, I KNOW this local part is wrong for RFC, but without accepting this local part, I cannot use Swiftmailer. I could use Swiftmailer when the version was 3 using Swift_RecipientList, but it seems the class has remove in version 4. The companties accept the wrong RFC are Docomo and Ezweb. They hold more than 70% share of Japanese cellphone, so this problem is very critical for web developers in Japan. Original creation date: 2010-02-27T08:16:16Z |
Changing _grammar['local-part'] in initializeGrammar() in AbstractHeader.php should do the trick. Have fun. Original creation date: 2010-02-28T17:54:21Z |
Some weeks ago, I started to refactored the code in v4.1. So, now, the grammar is in a dedicated class, which can be swapped by another one thanks to the dependency injection configuration. It's not perfect yet as tweaking the grammar involves some copy and paste. But at least, it is now possible to work around your problem. Original creation date: 2010-03-01T06:38:03Z |
Thanks, Maciej, Fabien. Actually, as a temporal quick fix, I just commented out codes from _assertValidAddress in mailboxHeader.php, but it is not that file I want to fix. Same as fixing AbstractHeader.php as Maciej suggested. And I'm really looking forward to using next release of Swiftmailer, which Fabien is working on. Please give us polymorphic ways to fix this or give strict (non-strict) mode or Japanese cellphone mode. We still have other different issues to work swiftmailer in Japanese mailing properly. I would use swiftmailer to do this, and when I find some problem, I will let you know. Once again, Thank you for considering this issue. :) Original creation date: 2010-03-02T05:29:44Z |
Bizzae Japanese Mobile Mail Address
By historical silly misunderstandings, some of Japanese cellphone carriers (NTT Docomo and KDDI au, No.1 and No.2 market shareholders) introduced RFC violated mail addresses. Even they fixed it for new registration, they are still widely used.
.foo@example.com
bar.@example.com
ba...z@example.com
All of above do not follow RFC2821, so giving those mail to Swift Mailer throws Exception.
[MTA]
But are they transferred properly? It depends on MTA. On Japanese part of the internet, they are usually accepted and transferred, because hundred of thousand such users exist.
[How other mailers treat it]
[iPhone]
When you tries to send to those address on iPhone, it pops up warning dialog. But you can proceed to send them.
[Outlook]
Outlook make it strict from Service Pack 3 and now you cannot send to those mail addresses.
[Gmail]
Google once introduced strict RFC filter, but now supports those format addresses if the receipients' domains are NTT Docomo or KDDI au.
[Possible Fixes]
I think it is a business and marketing decision so just list up fix options and want core team to choose.
As your products and services can be used by Japanese with their cellphone address, it is one option to make them accepted by all Swift Mailer users.
Pro:
Con:
If you turn it on, it accepts those bad addresses.
Pro:
only people who suffers the issue uses it
Con:
2-a) set it by constructor
2-b) set it by calling method after instantiaion
attached test code suggests this (method acceptJapaneseCellphoneAddress)
2-c) set it in configuration file
If a library user wants "warning", it is good if Swift_RfcComplianceException has more info, or specific subclass for "invalid RFC, but valid as Japanese cellphone address". Then it is possible for users to differenciate procedure afterwards. But it is not so mandatory as this can be also done outside of library before calling Swift Mailer.
And what to accept if the mode is set.
i) accept all of those invalid local part
ii) accept mail addresses by carriers who allowed invalid address
like what Gmail does. The patters are, as far as I know,
(local-part)@docomo.ne.jp
(local-part)@ezweb.ne.jp
(local-part)@[a-zA-Z0-9_]+.dion.ne.jp
(local-part)@[a-zA-Z0-9_]+.auone-net.jp
I attached an unit test code.
Original creation date: 2009-10-07T08:06:10Z
Original reporter: shin
Original ticket: http://swiftmailer.lighthouseapp.com/projects/21527/tickets/110
The text was updated successfully, but these errors were encountered: