Results 1 to 7 of 7

Thread: Please enter valid email address for To, CC and BCC fields

  1. #1
    MikeT is offline Junior Member
    Join Date
    Feb 2009
    Posts
    1

    Default Please enter valid email address for To, CC and BCC fields

    I am getting this error when I want to send an email to a lead and the system automatically generates the To: field. I have found the bug, but have no idea on how to fix it.

    Issue: In my settings, I have my names listed in the format " last name, first name" to sort my leads by last name. When I want to send an email to one of these leads, the system automatically enters "Last, First <email@email.com>. When I click on "Send", up pops the error message.

    Temp Fix: Delete the comma in the email field between the Last and First Name. Or just delete everything but the actual email address.

    Can you update the code so that when you auto-populate the email address field, it ALWAYS enters the format " First Last <email@email.com>"? This would fix the issue.

    Thanks and great program.

  2. #2
    DigiCRM is offline Senior Member
    Join Date
    Sep 2008
    Posts
    84

    Default Re: Please enter valid email address for To, CC and BCC fields

    Good find. What version of SugarCRM are you using?

  3. #3
    nickfoti9900 is offline Junior Member
    Join Date
    Aug 2009
    Posts
    3

    Default Re: Please enter valid email address for To, CC and BCC fields

    I have to bump this thread, I've noticed this exact problem in sugar community edition Version 5.5.0 (Build 6653). The offending character is the comma between the first and last name when the TO: field is auto filled via a reply (i.e. "Schmo, Joe" <joe.schmo@gmail.com> ).

    Any thoughts on a quick fix?

  4. #4
    nickfoti9900 is offline Junior Member
    Join Date
    Aug 2009
    Posts
    3

    Default Re: Please enter valid email address for To, CC and BCC fields

    Sorry to have to bump this again, but it's a very frustrating little problem.

    Any advice as to what file and function I need to edit to remove the comma would be greatly appreciated.

    Just to be clear, the issues occurs when I reply to emails using SugarCRM's email module.

    Thanks.
    Last edited by nickfoti9900; 2010-01-26 at 09:10 PM.

  5. #5
    csindia is offline Junior Member
    Join Date
    Feb 2010
    Posts
    1

    Default Re: Please enter valid email address for To, CC and BCC fields

    I have the same sort of problem. If I delete the comma I get a message "undefined".
    Alfred

  6. #6
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Please enter valid email address for To, CC and BCC fields

    This is bug No. 29670, but they closed it because they could not reproduce the bug.
    I added a note to the bug description how one can reproduce it.
    It came in Version 5.2.0.
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  7. #7
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Please enter valid email address for To, CC and BCC fields

    I think the bug is the "from_html($bean->full_name)" in module
    /modules/Emails/Compose.php.

    full_name ist the localized name and must not be used in an email.

    I would propose to replace the whole section

    PHP Code:
     if (isset($_REQUEST['to_email_addrs'])) {
      
    $namePlusEmail from_html($_REQUEST['to_email_addrs']);
      
    $namePlusEmail str_replace("&nbsp;"" "$namePlusEmail);
     } else {
      if (isset(
    $bean->full_name)) {
       
    $namePlusEmail from_html($bean->full_name) . " <"from_html($bean->emailAddress->getPrimaryAddress($bean)).">";
      } else  if(isset(
    $bean->emailAddress)){
       
    $namePlusEmail "<".from_html($bean->emailAddress->getPrimaryAddress($bean)).">";
      }
     } 
    by one simple satement:

    PHP Code:
       $namePlusEmail from_html($bean->first_name." ".$bean->last_name)."<".from_html($bean->emailAddress->getPrimaryAddress($bean)).">"
    or even only a
    PHP Code:
       $namePlusEmail "<".from_html($bean->emailAddress->getPrimaryAddress($bean)).">"
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Removing fields from 'Enter Business Card'
    By c.houghton in forum Developer Help
    Replies: 8
    Last Post: 2009-10-22, 10:08 PM
  2. How to create "Email Address(es)" like fields?
    By ptctaji in forum Developer Tutorials
    Replies: 0
    Last Post: 2009-01-21, 08:54 AM
  3. search subpanel has no fields to enter search
    By southwestcrm in forum Help
    Replies: 0
    Last Post: 2008-02-26, 04:48 PM
  4. Replies: 2
    Last Post: 2007-01-27, 12:22 AM
  5. Replies: 0
    Last Post: 2005-05-02, 01:51 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
  •