Sugar7 how to change default "From" address in email drawer?

--The Question--

I need to find a way to leverage the email options to set the default From address on an Email compose drawer. 

Occasionally the user will need to change the From so the other options should remain, but the default needs to be the queue on the case.


--Background--

I have several custom email compose buttons on the Email subpanel on Cases:
Internal Compose, Compose, Reply.

Each populates a number of fields like To, Subject, Body, and relates the email to the Case.
I do this via a custom API that returns an array:

               
    $composePackage = array(
      'to_addresses' => $toAddresses,
      'parent_type' => $parent_type,
      'parent_id' => $parent_id,
      'parent_name' => $parent_name,
      'subject'  => $subject,
      'html_body' => $body_html,
      'body' => $body,
  )
             


and $toAddresses is itself an array, for example:

        $toAddresses[]=array(
          'email'=>$email_addr,
          'module'=> 'Contacts',
          'name'=>$contact->full_name
        );
                       


This is used by a custom field type which is an extension of EmailactionFrield and opens the drawer with everything in place.

So, any thoughts on how to get the from default to be passed correctly to the EmailOptions?

thanks,
FrancescaS
Parents Reply
  • I understand your frustration, this change in functionality was an important show stopper for our upgrade and it took me a long time to sort out how to do what I needed to do for my company.

    Is your customer wanting to use a single address as the "from" address?That should be easier than my scenario where I have multiple outbound addresses: info@..., support@..., etc

    If you are ok with customizations to make this happen there is a way described in the link I sent you.

    basically you need to set the 

    'outbound_email_id' => $outbound_email_id,

    in the compose package.

    where the $outbound_email_id is the id of the outbound email address for the current user. 

    Unfortunately you do need to add the outbound email address for every user. There is a script in my linked solution that I use to do that, but I understand that v9 also has an option in Admin to manage that. I've not looked at that yet.

    I hope this gets you a step closer to your client's need.

    Francesca

Children
No Data