Results 1 to 10 of 10

Thread: Compose Email from Contacts using External Email Client

  1. #1
    jemadari is offline Junior Member
    Join Date
    Nov 2009
    Posts
    4

    Default Compose Email from Contacts using External Email Client

    Hello all,

    It's my first post, so please forgive me if I'm not following some particular rule about posting.

    I have a situation which I' m not sure if it's a bug or if it's suppose to be as is.

    When I select multiple contacts from the contacts module, and press the compose email button (using an external email client), I get a new blank email, but the to field is always empty.
    It seems like the emails from the selected contacts are not passed to the created email.

    Is it suppose to work like this or should it, as I would expect fill the to field with the emails from the selected contacts?

    The same thing occur for example with accounts, leads, ...

    Thanks in advance for your help.

    J

  2. #2
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Compose Email from Contacts using External Email Client

    Please describe the process you are following in more detail ...

  3. #3
    jemadari is offline Junior Member
    Join Date
    Nov 2009
    Posts
    4

    Default Re: Compose Email from Contacts using External Email Client

    Hello,

    Thank you for your reply, I'll try to be as detailed as possible.

    1 - I open the Contacts module (for example), which gives me a list with all my contacts.
    2 - I select some random contacts from the list with the available checkboxes on the left.
    3 - I click on the compose email button on the top of the contact list, next to Export, Merge Duplicates, ...
    4 - As I have my configuration set to use an external mail client, a new email window opens, but there is no email addresses filed (corresponding to the contacts I previously selected in 2)...

    I hope I was clear enough.

    Thank you for your help

  4. #4
    atirella is offline Junior Member
    Join Date
    Oct 2009
    Posts
    2

    Default Re: Compose Email from Contacts using External Email Client

    We are running into this exact same issue. It seems after a recent sugar update we can't click on compose email in the leads page and write the email using sugar. Please help.

  5. #5
    atirella is offline Junior Member
    Join Date
    Oct 2009
    Posts
    2

    Default Re: Compose Email from Contacts using External Email Client

    FYI I figure this out, basically Sugar changed the default to use an external client for each user. If you go into the admin section and edit the users email setting to user the sugar client the problem is resolved.

  6. #6
    jemadari is offline Junior Member
    Join Date
    Nov 2009
    Posts
    4

    Default Re: Compose Email from Contacts using External Email Client

    You are right about the sugar email client, it does work if I select this option.

    But the question is that I really need to use the external e-mail client, since I use outlook for all comunication purposes...

    Despite functioning correctly with the sugar email client, it does not do the same thing with the external one.

    Anyone able to help?..

    Thanks

  7. #7
    jemadari is offline Junior Member
    Join Date
    Nov 2009
    Posts
    4

    Default Re: Compose Email from Contacts using External Email Client

    Looks like no one is able to help with this issue.
    In case somenone is able to, here is all the information needed:

    - SugarCrm Version used: Community Edition 5.5.0
    - Both user and general Email settings are set to use External Mail Client
    - Outlook set as default mail client in firefox
    - Open the Contact tab
    - Select 2 or 3 contacts with email
    - click on Email action button (next to Merge, Add To Target List, ...)
    - A new blank email appears, but without any contact in the "To" field...

    Doing the exact same thing with the SugarCRM Mail Client selected, a blank email is created with the "To" field properly filled with the selected email addresses...

    Thank you for any help...

  8. #8
    Trevor.S is offline Member
    Join Date
    May 2010
    Posts
    5

    Default Re: Compose Email from Contacts using External Email Client

    I am bumping this thread as opposed to creating a new one. I am running into the exact same problem as stated above. I am using Version 5.5.2 (Build 1224) and outlook 2007. If I set it to use the sugar webmail then selecting multiple entries and pressing the email button fills in the To field correctly. Unfortunately when trying to use the external mail client, it opens up a new mail, but all of the fields are blank

  9. #9
    Trevor.S is offline Member
    Join Date
    May 2010
    Posts
    5

    Default Re: Compose Email from Contacts using External Email Client

    Alright, through some messing around I was able to find a solution for this problem. I am a novice when it comes to JS, php/AJAX so my fix is probably not the optimal way to do this. If anyone has any tips to make my changes better please let me know.

    Inside of include/javascript/sugar_grp1.js search for the line that contains use_external_mail_client and delete the function. Replace it with
    Code:
    function getXMLHttp()
    {
      var xmlHttp
      try
      {
        //Firefox, Opera 8.0+, Safari
        xmlHttp = new XMLHttpRequest();
      }
      catch(e)
      {
        //Internet Explorer
        try
        {
          xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e)
        {
          try
          {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
          }
          catch(e)
          {
            alert("Your browser does not support AJAX!")
            return false;
          }
        }
      }
      return xmlHttp;
    }
    
    
    sugarListView.prototype.use_external_mail_client=function(no_record_txt){selected_records=sugarListView.get_checks_count();
    if(selected_records<1){
    alert(no_record_txt);
    }
    else{
    inputs=document.MassUpdate.elements;ar=new Array();for(i=0;i<inputs.length;i++){if(inputs[i].name=='mass[]'&&inputs[i].checked&&typeof(inputs[i].value)!='function'){ar.push(inputs[i].value);}
    var mailids=ar.join(',');}
    var xmlHttp = getXMLHttp();
      xmlHttp.onreadystatechange = function()
      {
        if(xmlHttp.readyState == 4)
        {
          location.href=xmlHttp.responseText;
        }
      }
      xmlHttp.open("GET", 'externalmail.php' + mailids, true); 
      xmlHttp.send(null);
    
    }
    return false;}
    Then, create a file named externalmail.php and paste

    Code:
    <?php
    $username="yourusername";
    $database="sugarcrm";
    
    $dbId = $_GET[IDs];
    $ids = explode(",", $dbId);
    $command = "\"";
    foreach ($ids as $p){
    $p = mysql_real_escape_string($p);
    $command .=  $p;
    $command .= "\",\"";
    }
    $command = substr($command,0,-2);
    mysql_connect(localhost,$username);
    @mysql_select_db($database) or die( "Unable to select database");
    $query2 = "SELECT email_addresses.email_address AS email_addresses_email_address FROM email_addr_bean_rel, email_addresses WHERE email_addr_bean_rel.bean_id IN ($command) AND email_addr_bean_rel.email_address_id = email_addresses.id  AND email_addr_bean_rel.deleted = 0 AND email_addresses.deleted = 0";
    $result = mysql_query($query2);
    $num=mysql_numrows($result);
    mysql_close();
    $i=0;
    $mailstring = "mailto: ";
    while ($i < $num) {
    $first=mysql_result($result,$i,"email_addresses_email_address");
    $mailstring.= "$first; ";
    $i++;
    }
    echo $mailstring;
    ?>
    Change your username and add a password if needed.

    Obviously backup any files before you modify them, and I take no responsibility if anything gets broken while attempting to do this.

    Any changes that would make this better please let me know. Also a bug I have found is that if you check items on one tab and move to another, the addresses from the first page will not be entered.
    Last edited by Trevor.S; 2010-06-17 at 03:00 PM.

  10. #10
    climbing-alien is offline Sugar Community Member
    Join Date
    Jul 2010
    Posts
    27

    Default Re: Compose Email from Contacts using External Email Client

    Hi

    Amazingly this bug seems to be in 6.1 also. Tried the code above but slightly strangely just generates an error in the address bar.

    HTML Code:
    http://XXXl/%3C?xml%20version=%221.0%22%20encoding=%22ISO-8859-1%22?%3E%3C!DOCTYPE%20html%20PUBLIC%20%22-//W3C//DTD%20XHTML%201.0%20Strict//EN%22%20%20%22http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%22%3E%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%20lang=%22en%22%20xml:lang=%22en%22%3E%3Chead%3E%3Ctitle%3EObject%20not%20found!%3C/title%3E%3Clink%20rev=%22made%22%20href=%22mailto:admin@localhost%22%20/%3E%3Cstyle%20type=%22text/css%22%3E%3C!--/*--%3E%3C![CDATA[/*%3E%3C!--*/%20%20%20%20%20body%20{%20color:%20#000000; background-color: #FFFFFF; }    a:link { color: #0000CC; }    p, address {margin-left: 3em;}    span {font-size: smaller;}/*]]>*/--></style></head><body><h1>Object not found!</h1><p>    The requested URL was not found on this server.      The link on the    <a href="XXX/index.php%3fmodule=Leads&action=index">referring    page</a> seems to be wrong or outdated. Please inform the author of    <a href="XXXl/index.php%3fmodule=Leads&action=index">that page</a>    about the error.  </p><p>If you think this is a server error, please contactthe <a href="mailto:admin@localhost">webmaster</a>.</p><h2>Error 404</h2><address> <a href="/">XXX</a><br /> <span>01/07/11 04:56:27<br />  Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9</span></address></body></html>
    Server name has been redacted with XXX

    Really need to get this working and very surprised its a bug thats lasted so long.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem using External Email Client
    By iamdanny in forum Help
    Replies: 0
    Last Post: 2008-09-09, 09:30 PM
  2. Replies: 0
    Last Post: 2008-06-07, 06:14 PM
  3. external email client
    By mofeta in forum Help
    Replies: 1
    Last Post: 2007-05-31, 07:50 PM
  4. Replies: 7
    Last Post: 2007-05-18, 07:50 AM

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
  •