I was developing a web site to send email to Japanese mobile phone user. Because of their selfish discipline, the major two mobile service phone companies do not follow RFC.
They accept ridiculous addresses such as:
foobar..@example.com
and some of our users have such addresses.
This is big trouble for developers in Japan, because web service for mobile phone users is big market.
If I passed the above address to send method of swift class, it throws exception that explain the address is wrong. I know it is wrong, but I have to send to the address anyhow.
To avoid this problem, one of our solution is doublequotating the wrong dot-atom part as follows:
"foobar.."@example.com
If I could do this, I can send the mail to the address and the rule follows RFC.
So, I wonder if developers of Swift Mailer can fix the Swift_Message_Encoder::CHEAP_ADDRESS_RE value as:
const CHEAP_ADDRESS_RE = '(?:[^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff])|"[^\\\\\x80-\xff\n\015"]*(?:\\\\[^\x80-\xff][^\\\\\x80-\xff\n\015"]*)*")(?:\.(?:[^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff])|"[^\\\\\x80-\xff\n\015"]*(?:\\\\[^\x80-\xff][^\\\\\x80-\xff\n\015"]*)*"))*@(?:[^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\\\x80-\xff\n\015\[\]]|\\\\[^\x80-\xff])*\])(?:\.(?:[^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\\\x80-\xff\n\015\[\]]|\\\\[^\x80-\xff])*\]))*'
Because symfony is good combination with Swift Mailer, I would like to use Swift, but with rejecting some mail address as I showed above, many developers in Japan have to give up using Swift Mailer.
Thanks,
Shin