[Vtigercrm-developers] Mailconverter fails valid usernames [vt 6.2]

Hamono, Chris (DPC) Chris.Hamono at sa.gov.au
Fri Jun 12 00:54:41 GMT 2015


Try the username vtiger.testing7<mailto:vtiger.testing7 at gmail.com>

Most email accounts don’t use the email address as the username. Only shared accounts like gmail, yahoo and other virtual mail accounts do

The test I outlined below is an invalid test.

This is how it works


1.      If the username equates to false the test passes

2.      If the username looks like an email address the test passes

3.      If the username matches this regex /^[\w _\-]+$/ the test passes


1)      The first test should actually fail. I don’t know of any imap account you can log into without a valid username.

2)      The second test is fine and how your username passed (be aware email addresses are very very hard to validate)

3)      In your case the third test was never reached, it would have failed if it did.

Test the regex here
http://regexr.com/3b6ie

try removing the dot from the user name in the above regex test

Chris

From: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] On Behalf Of Manu urs
Sent: Thursday, 11 June 2015 8:34 PM
To: vtigercrm-developers at lists.vtigercrm.com
Subject: Re: [Vtigercrm-developers] Mailconverter fails valid usernames [vt 6.2]

Hi
We tested this issue in the  demo.vtiger.com<http://demo.vtiger.com>  , with the username  ""  its works fine.
Can you please check your credentials.

Regards,
Manu Urs

On Thu, Jun 11, 2015 at 7:04 AM, Stacey Johnson <stacey.johnson110 at gmail.com<mailto:stacey.johnson110 at gmail.com>> wrote:
Following mail converter... the conditions should be applied to every field not only to Subject and body, so it will be easier filtering records creation


Stacey


On Thu, Jun 11, 2015 at 8:08 AM, Hamono, Chris (DPC) <Chris.Hamono at sa.gov.au<mailto:Chris.Hamono at sa.gov.au>> wrote:
When setting up a mailconverter I kept getting errors “could not connect. Special Characters not allowed”

It appears vtiger incorrectly rejects any username that is not pure alpha numeric.

The file " modules\Settings\MailConverter\models\Record.php"

Has this bit of code @ line 210
           $userName = $this->get('username');
           if($userName && !validateEmailId($userName) && !validateAlphanumericInput($userName)) {
                return false;
           }

This test fails if the username contains non numeric characters such as a full stop (which is a common format for user names e.g. “firstname.lastname”)

Oddly it doesn’t fail if the username is not supplied or equates to false.

Commenting out this code allows the mail box to be correctly configured.

Chris

_______________________________________________
http://www.vtiger.com/


_______________________________________________
http://www.vtiger.com/



--
Regards,
Manu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150612/9289e594/attachment-0001.html>


More information about the vtigercrm-developers mailing list