Answers.Body: <p>I notice that the first line of your backTrace is line 1190 in the Token.php file, which is this:</p>
  
  <pre><code>   if (empty($contactIDs)) {
        // putting a fatal here so we can track if/when this happens
        CRM_Core_Error::fatal();
      }
  </code></pre>
  
  <p>Judging from the fact that it appears to happen when you are the only recipient, I'd guess that it's because of something funny about your own contact record. For example - perhaps your contact record (i.e. the one that is connected to your login) is deleted?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T16:56:11.967Z
Answers.Text: I thought so as well. Created a new contact for an alternate email address and getting the same thing.
Answers.UserDisplayName: dahifi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T21:33:44.083Z
Answers.Text: so on your record, you have a link back to the CMS user that you are logged in as? (which cms?)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-26T03:04:38.877Z
Answers.Text: It's happening for other user records as well.
Answers.UserDisplayName: dahifi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-25T16:52:54.063Z
Answers.LastActivityDate: 2017-01-25T16:52:54.063Z
Answers.UserDisplayName: Alan Dixon
Body: <p>Drupal 7, CiviCRM 4.6.25/4.7.15</p>
  
  <p>When I try to send an email to an individual contact using the 'send mail' action, the triangle spins and nothing happens. Affects our production and test site. </p>
  
  <p>mail() configuration check out fine, and mailings 'send test' works. Haven't extensively checked this as we haven't gone live with the site. </p>
  
  <p>The log/backtrace points to /civicrm/CRM/Utils/Token.php, line 1190: </p>
  
  <pre><code>     if (empty($contactIDs)) {
        // putting a fatal here so we can track if/when this happens
        CRM_Core_Error::fatal();
  </code></pre>
  
  <p>I've blown out our test database and re-initialized it with sample data -- no fix. </p>
  
  <p>I've also upgraded our test site to 4.7.15 and am getting the same problem, stemming from the token.php function</p>
  
  <p>Stranger still, if we use the 'send now (to less than 50 people)' selection from the contact search page, email works, just not from the contact record directly. </p>
  
  <p>Works: </p>
  
  <pre><code>civicrm/contact/search?_qf_Email_display=true&amp;qfKey=2b01f498b92b4b919c45446ae38d6c5d_3790
  </code></pre>
  
  <p>Doesn't: </p>
  
  <pre><code>civicrm/activity/email/add?action=add&amp;reset=1&amp;cid=202&amp;selectedChild=activity&amp;atype=3
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T05:23:25.110Z
Comments.Text: can you flesh out. are you sending this from the Contact > Actions, or after a search, or something else. Providing steps for someone to replicate often helps avoid people making presumptions ;-)
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T15:28:16.583Z
Comments.Text: Yes, the contact > actions page, the triangle icon spins and I eventually have to escape out.
Comments.UserDisplayName: dahifi
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T17:09:46.213Z
Comments.Text: Debating whether to upgrade to 4.7, but I was using LTS for a reason. I'm using a webhost with limited access to the server. Most of my administration is through CPanel, but since the test email configuration is working I'm guessing the issue is with Civi and not my host?
Comments.UserDisplayName: dahifi
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-25T21:24:31.130Z
Comments.Text: can you glean anything more by using right click in order to open the 'action' in a new tab? (that might only help you get backtrace though which you already have). in my quick test the url would look like following with XX being the target contacts cid: civicrm/activity/email/add?action=add&reset=1&cid=XXX&selectedChild=activity&atype=3
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-26T16:22:18.623Z
Comments.Text: I've added additional information to the question. I've got a workaround, but am waiting for an invite to the bug tracker to file a formal report.
Comments.UserDisplayName: dahifi
Tags: <contacts><mailing>
Title: Contact mail action fails
ThreadText: # Contact mail action fails
  
  (Asked by: username_0 on 2017-01-25)
  
  Drupal 7, CiviCRM 4.6.25/4.7.15
  
  When I try to send an email to an individual contact using the 'send mail' action, the triangle spins and nothing happens. Affects our production and test site.
  
  mail() configuration check out fine, and mailings 'send test' works. Haven't extensively checked this as we haven't gone live with the site.
  
  The log/backtrace points to /civicrm/CRM/Utils/Token.php, line 1190:
  
  ```
       if (empty($contactIDs)) {
        // putting a fatal here so we can track if/when this happens
        CRM_Core_Error::fatal();
  
  ```
  
  I've blown out our test database and re-initialized it with sample data -- no fix.
  
  I've also upgraded our test site to 4.7.15 and am getting the same problem, stemming from the token.php function
  
  Stranger still, if we use the 'send now (to less than 50 people)' selection from the contact search page, email works, just not from the contact record directly.
  
  Works:
  
  ```
  civicrm/contact/search?_qf_Email_display=true&qfKey=2b01f498b92b4b919c45446ae38d6c5d_3790
  
  ```
  
  Doesn't:
  
  ```
  civicrm/activity/email/add?action=add&reset=1&cid=202&selectedChild=activity&atype=3
  
  ```
  
  **Tags:** contacts, mailing
  
  > **Comments:**
  > **username_1**: can you flesh out. are you sending this from the Contact > Actions, or after a search, or something else. Providing steps for someone to replicate often helps avoid people making presumptions ;-)  
  > **username_0**: Yes, the contact > actions page, the triangle icon spins and I eventually have to escape out.  
  > **username_0**: Debating whether to upgrade to 4.7, but I was using LTS for a reason. I'm using a webhost with limited access to the server. Most of my administration is through CPanel, but since the test email configuration is working I'm guessing the issue is with Civi and not my host?  
  > **username_1**: can you glean anything more by using right click in order to open the 'action' in a new tab? (that might only help you get backtrace though which you already have). in my quick test the url would look like following with XX being the target contacts cid: civicrm/activity/email/add?action=add&reset=1&cid=XXX&selectedChild=activity&atype=3  
  > **username_0**: I've added additional information to the question. I've got a workaround, but am waiting for an invite to the bug tracker to file a formal report.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-01-25. Score: 0
  
  I notice that the first line of your backTrace is line 1190 in the Token.php file, which is this:
  
  ```
     if (empty($contactIDs)) {
        // putting a fatal here so we can track if/when this happens
        CRM_Core_Error::fatal();
      }
  
  ```
  
  Judging from the fact that it appears to happen when you are the only recipient, I'd guess that it's because of something funny about your own contact record. For example - perhaps your contact record (i.e. the one that is connected to your login) is deleted?
  
  > **Comments:**
  > **username_0**: I thought so as well. Created a new contact for an alternate email address and getting the same thing.  
  > **username_1**: so on your record, you have a link back to the CMS user that you are logged in as? (which cms?)  
  > **username_0**: It's happening for other user records as well.  
  
  ---
  
  