Answers.Body: <p>I believe there are several domain tokens.  domain.Name, domain.Address, domain.email, domain.phone.</p>
  
  <p>These are set on the Administer => Communications => 
  Organization Address and Contact Info page.</p>
  
  <p>The only one that I think is required is domain.address.  This has line breaks between the street address and the city, etc.  You can blank out address, the city and remove the zip but getting rid of the country and state may not be possible. (Well if you are in a country without states you can get rid of state)</p>
  
  <p>The {domain.address} is a smarty.  You can do all sorts of things with smarties.  You might be able use regex to replace the line breaks or to remove parts of the address you don't want.  <a href="http://www.smarty.net/" rel="nofollow">http://www.smarty.net/</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-20T00:30:10.710Z
Answers.LastActivityDate: 2015-05-20T00:30:10.710Z
Answers.UserDisplayName: Paul-Tahoe
Answers.Body: <p>This is computed in CRM/Utils/Token.php in the function getDomainTokenReplacement (which in turn gets it from the function getLocationValues)</p>
  
  <p>I think you might be able to override this in the tokenValues hook and send in your own value for domain.addresss. Creating your own tokens is described here:</p>
  
  <p><a href="https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit" rel="nofollow">https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-01T22:56:19.843Z
Answers.Text: The updated URL for the blog post is: https://civicrm.org/blog/colemanw/create-your-own-tokens-for-fun-and-profit
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-20T02:23:51.693Z
Answers.LastActivityDate: 2015-05-20T02:23:51.693Z
Answers.UserDisplayName: Donald Lobo
Answers.Body: <p>To my knowledge, you can't really do much with how it prints. But you can use CSS to set display:none on it. There is also a global CiviMail setting that allows you to send mailings without using the token.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-19T23:27:41.400Z
Answers.LastActivityDate: 2015-05-19T23:27:41.400Z
Answers.UserDisplayName: Nicholai
Body: <p>I am required to use the {domain} token for mass mailing, but it is formatted with line breaks .. can I modify that formatting ?</p>
  
Tags: <civimail><tokens>
Title: Where / how is the {domain} token formatted?
ThreadText: # Where / how is the {domain} token formatted?
  
  (Asked by: username_0 on 2015-05-19)
  
  I am required to use the {domain} token for mass mailing, but it is formatted with line breaks .. can I modify that formatting ?
  
  **Tags:** civimail, tokens
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2015-05-20. Score: 2
  
  I believe there are several domain tokens. domain.Name, domain.Address, domain.email, domain.phone.
  
  These are set on the Administer => Communications =>
  Organization Address and Contact Info page.
  
  The only one that I think is required is domain.address. This has line breaks between the street address and the city, etc. You can blank out address, the city and remove the zip but getting rid of the country and state may not be possible. (Well if you are in a country without states you can get rid of state)
  
  The {domain.address} is a smarty. You can do all sorts of things with smarties. You might be able use regex to replace the line breaks or to remove parts of the address you don't want. <http://www.smarty.net/>
  
  
  ---
  
  ### Answer by username_2 on 2015-05-20. Score: 2
  
  This is computed in CRM/Utils/Token.php in the function getDomainTokenReplacement (which in turn gets it from the function getLocationValues)
  
  I think you might be able to override this in the tokenValues hook and send in your own value for domain.addresss. Creating your own tokens is described here:
  
  <https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit>
  
  > **Comments:**
  > **username_3**: The updated URL for the blog post is: https://civicrm.org/blog/colemanw/create-your-own-tokens-for-fun-and-profit  
  
  ---
  
  ### Answer by username_4 on 2015-05-19. Score: 0
  
  To my knowledge, you can't really do much with how it prints. But you can use CSS to set display:none on it. There is also a global CiviMail setting that allows you to send mailings without using the token.
  
  
  ---
  
  