Answers.Body: <p>It seems to be hardcoded at <a href="https://github.com/civicrm/civicrm-core/blob/cb21080b397be5f8b84bca2c6d3483ad64d7071f/CRM/Contact/BAO/Contact.php#L1934" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/cb21080b397be5f8b84bca2c6d3483ad64d7071f/CRM/Contact/BAO/Contact.php#L1934</a></p>
  <p><code>$name = &quot;{$dao-&gt;first_name} {$dao-&gt;last_name}&quot;;</code></p>
  <p>I don't see an obvious reason why it's hardcoded, but the function is used in a couple places - maybe there are some places where it was needed to have a &quot;short version&quot; of the display name.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-07T13:26:11.993Z
Answers.Text: Thank you very much.  I could change the order.  I can now send emails by the East Asian style. This is quite important for us.
Answers.UserDisplayName: Chitose
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-08T13:13:24.693Z
Answers.Text: I'm assuming CiviCRM is not using the display name because prefixes in email can be awkward, but I tend to always remove prefixes. Do we need a new setting? Seems important here.
Answers.UserDisplayName: bgm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-08T20:47:09.667Z
Answers.Text: There is a token {contact.email_greeting} which should work for you - that is configurable per user & also has it's own template - like display name
Answers.UserDisplayName: eileen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-08T20:53:30.633Z
Answers.Text: But that won't change the "To" in the email headers. Or are you saying to replace the hardcoding in the code with the token? But it usually contains "Dear" in it.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-05-07T13:07:42.743Z
Answers.LastActivityDate: 2022-05-07T13:07:42.743Z
Answers.UserDisplayName: Demerit
Body: <p>I have been trying to send email to my contacts with their name last name and first name order.  I mean &quot;To: last_name first_name example@example.com&quot;</p>
  <p>I have already changed the Display Preference to {contact.last_name}{ }{contact.first_name} from the Administrator menu.
  It works fine for the display and also for CKEditor's to field.  It is properly shown as last_name first_name order as I wanted.</p>
  <p>But when I send an email, email comes with the name by the different order, I mean &quot;To: first_name last_name example@example.com&quot;, which is not suitable in East Asia.  The email header is quite essential to keep our relationships with our contacts.</p>
  <p>I tried to find a way to change it but in vain.</p>
  <p>Could someone help me how to solve this?  Thank you in advance.</p>
  
Tags: <email>
Title: How to change the order to last name and first name in the email from header?
ThreadText: # How to change the order to last name and first name in the email from header?
  
  (Asked by: username_0 on 2022-05-07)
  
  I have been trying to send email to my contacts with their name last name and first name order. I mean "To: last\_name first\_name example@example.com"
  
  I have already changed the Display Preference to {contact.last\_name}{ }{contact.first\_name} from the Administrator menu.
  It works fine for the display and also for CKEditor's to field. It is properly shown as last\_name first\_name order as I wanted.
  
  But when I send an email, email comes with the name by the different order, I mean "To: first\_name last\_name example@example.com", which is not suitable in East Asia. The email header is quite essential to keep our relationships with our contacts.
  
  I tried to find a way to change it but in vain.
  
  Could someone help me how to solve this? Thank you in advance.
  
  **Tags:** email
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-05-07. Score: 0
  
  It seems to be hardcoded at <https://github.com/civicrm/civicrm-core/blob/cb21080b397be5f8b84bca2c6d3483ad64d7071f/CRM/Contact/BAO/Contact.php#L1934>
  
  `$name = "{$dao->first_name} {$dao->last_name}";`
  
  I don't see an obvious reason why it's hardcoded, but the function is used in a couple places - maybe there are some places where it was needed to have a "short version" of the display name.
  
  > **Comments:**
  > **username_0**: Thank you very much.  I could change the order.  I can now send emails by the East Asian style. This is quite important for us.  
  > **username_2**: I'm assuming CiviCRM is not using the display name because prefixes in email can be awkward, but I tend to always remove prefixes. Do we need a new setting? Seems important here.  
  > **username_3**: There is a token {contact.email_greeting} which should work for you - that is configurable per user & also has it's own template - like display name  
  > **username_1**: But that won't change the "To" in the email headers. Or are you saying to replace the hardcoding in the code with the token? But it usually contains "Dear" in it.  
  
  ---
  
  