Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: 5.0b email adding / validation problem with sugar email system

  1. #1
    Cousteau is offline Junior Member
    Join Date
    Dec 2005
    Posts
    4

    Default 5.0b email adding / validation problem with sugar email system

    Hi Folks,

    After upgrading to 5.0b we found a minor but unpleasing bug in the upgraded sugar email system.

    When we add recipient from our crm database to TO, to CC or to BCC fields by clicking to the (TO: ) (CC: ) or (BCC: ) buttons the system does not add valid format email addresses to the mail.

    The added format is the following:
    Firstname Familyname <firstname.familyname@domain.hu>; Other Recipient <other.recipient@otherdomain.hu>

    And when we push send the system pops up an error message, and does not send anything. The error message is as follows:
    'Please enter valid email address for To, CC and BCC fields'

    Although we can send emails by deleting the everything, except he pure email addresses (i.e. firstname.familyname@domain.hu works fine), but our users had complaints about missing the good usability of this adding feature.

    With the previous versions (5.0, and 5.0a) this add function worked perfectly, and was quite convenient for our users.

    Are there any idea how to fix this bug?
    Last edited by Cousteau; 2008-02-17 at 10:30 PM.

  2. #2
    Cousteau is offline Junior Member
    Join Date
    Dec 2005
    Posts
    4

    Default Re: 5.0b email adding / validation problem with sugar email system

    Hi Folks,

    We found the buggy file: /include/javascript/sugar_grp1.js

    Replacing it with the old one from 5.0a edition is a good temporary workaround to this validation problem.

    Cheers
    Geza

  3. #3
    sgandhi is offline Sugar Team Member
    Join Date
    Aug 2007
    Posts
    217

    Default Re: 5.0b email adding / validation problem with sugar email system

    The reason it deoesn't work because there is a semicolon at the end. If you remove it then it works fine. If there is only one email addresss then we don't need semicolon. If there are multiple entries then the email address should be seperated by semicolon but having semicolon at the end of the TO or CC or BCC field doesn't make sense.

    Thanks
    -Samir

  4. #4
    supportvirtuo is offline Junior Member
    Join Date
    Jan 2008
    Posts
    4

    Default Re: 5.0b email adding / validation problem with sugar email system

    If you go in /include/javascript/sugar_grp1.js like cousteau said, search for split(,) and change the comma with a ; and everything should work like it used to.

  5. #5
    sgandhi is offline Sugar Team Member
    Join Date
    Aug 2007
    Posts
    217

    Default Re: 5.0b email adding / validation problem with sugar email system

    Hi Cousteau,
    In order to give more flexibilty, I have modified the function isValidEmail's if condition with this new one.

    if(!/^\s*[\w.%+\-]+@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[A-Z]{2,4}\s*;\s*?$/i.test(emailArr[i]) &&
    !/^[\w\s.%+\-]*<[A-Z0-9._%+\-]+?@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[A-Z]{2,4}>\s*;?\s*$/i.test(emailArr[i]))


    -Samir

  6. #6
    markgill is offline Sugar Community Member
    Join Date
    Mar 2007
    Posts
    23

    Default Re: 5.0b email adding / validation problem with sugar email system

    Quote Originally Posted by sgandhi
    Hi Cousteau,
    In order to give more flexibilty, I have modified the function isValidEmail's if condition with this new one.

    if(!/^\s*[\w.%+\-]+@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[A-Z]{2,4}\s*;\s*?$/i.test(emailArr[i]) &&
    !/^[\w\s.%+\-]*<[A-Z0-9._%+\-]+?@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[A-Z]{2,4}>\s*;?\s*$/i.test(emailArr[i]))


    -Samir
    Does this cause an email evaluation error in other records for you? For instance, if one enters an email address in a contact reocrd, do you get an error unless you add brackets around the address like <myaddress@my.domain> ?

    Mark

  7. #7
    jjwdesign's Avatar
    jjwdesign is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Orlando, FL
    Posts
    503

    Default Re: 5.0b email adding / validation problem with sugar email system

    Shouldn't the first semicolon be optional

    ;?

    var emailArr=emailStr.split(';');for(var i=0;i<emailArr.length;i++){if(!/^\s*[\w.%+\-]+@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[A-Z]{2,4}\s*;?\s*$/i.test(emailArr[i]) && !/^[\w\s.%+\-]*<[A-Z0-9._%+\-]+?@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[A-Z]{2,4}>\s*;?\s*$/i.test(emailArr[i]))
    Jeff

  8. #8
    JVWay is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Corvallis, Oregon
    Posts
    452

    Default Re: 5.0b email adding / validation problem with sugar email system

    What needs to be done after making these or any changes to the .js files. I've tried running repairs but I still have this email validation problem.

    Thanks,
    JW
    Jerry Way
    Business Process Administrator

    Sugar 6.1.4 Professional
    (Testing 6.1.2)
    LAMP on Centos 5
    PHP 5
    MySQL 5
    Apache 2.2

  9. #9
    aran01 is offline Junior Member
    Join Date
    Mar 2008
    Posts
    1

    Default Re: 5.0b email adding / validation problem with sugar email system

    Yep I also tried this fix and I still have the same problem.
    This email client is well broken. Showed it to some people yesterday and they said they could not work with it.
    Problem with this issue and their sigs get malformed also.

  10. #10
    sgandhi is offline Sugar Team Member
    Join Date
    Aug 2007
    Posts
    217

    Default Re: 5.0b email adding / validation problem with sugar email system

    Hi All,
    Here is the fix for that.

    var emailArr = emailStr.split(/[,;]/);
    for (var i = 0; i < emailArr.length; i++) {
    if(!/^\s*[\w.%+\-]+@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[A-Z]{2,4}\s*$/i.test(emailArr[i]) &&
    !/^[\w\s.%+\-]*<[A-Z0-9._%+\-]+?@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[A-Z]{2,4}>\s*$/i.test(emailArr[i]))

    return false;
    }

    -Samir

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. email marketing feature requests
    By maxsutter in forum Feature Requests
    Replies: 1
    Last Post: 2008-10-11, 10:19 AM
  2. sugar v5 email campaign not emailing
    By hodgson in forum Help
    Replies: 7
    Last Post: 2007-12-20, 08:37 PM
  3. Replies: 43
    Last Post: 2007-10-26, 06:14 PM
  4. Replies: 1
    Last Post: 2007-02-21, 11:42 AM
  5. Replies: 8
    Last Post: 2006-05-26, 10:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •