Details
Description
When forward mail by token generated link. We can enter email address. But it will appear "validate failed" even we enter correct email address. After hours of debug, we found that because user will enter only common email address, but the validator function validateMailbox() in RFC822.php won't permit this type of mail address.
Please see the backtrace message below.
<code>
PEAR_Error Object
(
[error_message_prefix] =>
[mode] => 16
[level] => 1024
[code] =>
[message] => Validation failed for: valid@emailaddress.com
[userinfo] =>
[backtrace] => Array
(
[0] => Array
(
[file] => /var/www/paper-civicrm/sites/all/modules/civicrm/packages/PEAR.php
[line] => 566
[function] => PEAR_Error
[class] => PEAR_Error
[type] => ->
[args] => Array
(
[0] => Validation failed for: valid@emailaddress.com
[1] =>
[2] => 16
[3] => Array
(
[0] => CRM_Core_Error
[1] => nullHandler
)
[4] =>
)
)
[1] => Array
(
[file] => /var/www/paper-civicrm/sites/all/modules/civicrm/packages/Mail/RFC822.php
[line] => 198
[function] => raiseError
[class] => PEAR
[type] => ->
[object] => Mail_RFC822 Object
(
[address] =>
[default_domain] => localhost
[nestGroups] =>
[validate] => 1
[addresses] => Array
(
[0] => Array
(
[address] =>valid@emailaddress.com
[group] =>
)
)
[structure] => Array
(
)
[error] => Validation failed for:valid@emailaddress.com
[index] => 0
[num_groups] => 0
[mailRFC822] => 1
[limit] =>
)
[args] => Array
(
[0] => Validation failed for: valid@emailaddress.com
)
)
[2] => Array
(
[file] => /var/www/paper-civicrm/sites/all/modules/civicrm/packages/Mail/RFC822.php
[line] => 166
[function] => parseAddressList
[class] => Mail_RFC822
[type] => ->
[object] => Mail_RFC822 Object
(
[address] =>
[default_domain] => localhost
[nestGroups] =>
[validate] => 1
[addresses] => Array
(
[0] => Array
(
[address] => valid@emailaddress.com
[group] =>
)
)
[structure] => Array
(
)
[error] => Validation failed for: valid@emailaddress.com
[index] => 0
[num_groups] => 0
[mailRFC822] => 1
[limit] =>
)
[args] => Array
(
)
)
</code>