Results 1 to 1 of 1

Thread: Place contactinformation of sender in emailsig

  1. #1
    markv is offline Sugar Community Member
    Join Date
    Jun 2007
    Posts
    39

    Default Place contactinformation of sender in emailsig

    My problem
    I want to create an email template which has a dynamic footer. The dynamic footer has the contactinformation of the person sending the message.

    When I'm creating a template I can use the Insert Variable drop-down to insert the right placeholders. The problem is that when the message is send the content of the placeholders is filled with the information of the “record owner” not of the one sending the message.

    Why not use the signature?
    But you can use variable signatures for each employee you might say, which is true. The problem is that when "Signature above reply" = true, it puts the sig above the template, which is not what I want. Furthermore I have to maintain a sig for everybody in the company.

    Possible solutions
    So there are two possible solutions.
    • When the mail is not a campaign match the sender not the record owner
    • When creating a message using a template, place the signature under the template. (select template, select sig). Or place the sig on the location of the cursor.


    I favour the first option (matching).

    My question?
    Which file do I have to edit to create the “match the sender not the record owner” functionality?
    Might this be a good addition to sugarCRM?

    (currently using sugar crm 6.1.3 community edition)


    Ok i found the file:
    /modules/EmailTemplates/EmailTemplates.php

    Code:
    	if(!empty($focus->assigned_user_id)) {
    		$user = new User();
    		$user->retrieve($focus->assigned_user_id);
    		$repl_arr = EmailTemplate::_parseUserValues($repl_arr, $user);
    	}
    } elseif($bean_name == 'Users') {
    	/**
    	* This section of code will on do work when a blank Contact, Lead,
    	* etc. is passed in to parse the contact_* vars.  At this point,
    	* $current_user will be used to fill in the blanks.
    	*/
    	$repl_arr = EmailTemplate::_parseUserValues($repl_arr, $current_user);
    	
    	etc
    The second part selects the current user so if you want this you can replace:
    Code:
    $repl_arr = EmailTemplate::_parseUserValues($repl_arr, $user);
    with:
    Code:
    $repl_arr = EmailTemplate::_parseUserValues($repl_arr, $current_user);
    But it's a dirty hack. It should determine if it's a campaign or a single message send directly and than select the right user.
    Last edited by markv; 2011-05-16 at 05:53 PM.
    Working at VoIP provider Voys
    Tweeting @markv (nl)
    Loving SugarCRM more with every update.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Default Email Sender Setting
    By eskimo111273 in forum Help
    Replies: 15
    Last Post: 2009-03-11, 07:55 PM
  2. campaign email sent by <unknown sender>
    By acherwinski in forum Help
    Replies: 1
    Last Post: 2009-01-15, 02:50 PM
  3. Default email sender
    By pstouffer in forum Help
    Replies: 4
    Last Post: 2008-11-03, 10:43 PM
  4. change the email sender name dinamically
    By matteoraggi in forum Feature Requests
    Replies: 0
    Last Post: 2008-03-11, 01:04 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
  •