Body: <p>Using WordPress 5.4 and CiviCRM Version 5.18.4. CiviMail has been working fine, mostly, using Mail(). 
  This problem is seen when sending mail to an individual from their contact page, or when sending a test mail of what will hopefully be a bulk mailing.  </p>
  
  <p>One particular email message fails to send.  It is fairly long, and the content is fairly complex, with lots of links and some standard html formatting.  </p>
  
  <p>When sending, I get either "An error occurred when CiviCRM attempted to send an email (via SMTP). ... The mail library returned the following error message: mail() returned failure" OR (if a "test" mailing) "Could not identify any recipients. Perhaps the group is empty?"</p>
  
  <p>I searched the html source for anything weird, but found nothing.  I can send the entire content in small pieces, but when I put them all together, it fails.  I can send the entire content as plain text.  It's possible that there is some other reason for the odd pattern of failures, but "too much content" or "too many links" seems like a possible one.  But I don't see anything about it in documentation.</p>
  
  <p>Has anyone seen something like this?  Any other troubleshooting steps you can suggest to pinpoint the problem?  Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-30T20:41:29.920Z
Comments.Text: "I can send the entire content in small pieces" do you mean you successfully sent part of mailing out to the group? just to rule out the problem relating to the Group itself
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-30T22:26:37.797Z
Comments.Text: No, I mean broke the text of the message into pieces.  Well, actually I deleted large portions of the email before sending the test message, and it sent the smaller version ok to the test recipient(s).  I would try again, removing a different portion of the content, and it would still go out OK, until I had sent every word of the message successfully.  But send the whole message?  Error..
Comments.UserDisplayName: David Hyman
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-01T02:07:36.160Z
Comments.Text: so the error is even when sending Test msg?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-02T02:10:18.700Z
Comments.Text: Yes, either when sending the message to individuals from their Contact screen, OR when preparing a draft bulk mailing and sending a test message (to one person or a small test group.  
  For what it is worth, I eventually gave up and edited down the message until it was smaller and had fewer links, and now it seems to send out ok.  I would still very much like to know if this limitation is known to exist.   Could it be a "timing out" issue?
Comments.UserDisplayName: David Hyman
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-03T05:10:59.770Z
Comments.Text: and you are sure it is the number of links rather than the overall length? ie if you send out a msg with just as many actually characters but with fewer links does it work? (as in count the characters of the 'source' of the mail so it includes all the html characters too)
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-04T08:00:35.060Z
Comments.Text: Yes, I did test that way too.  But as I said, I have now shortened the message, removed links, and it went out ok as a test, AND when I sent it as a bulk mail to three recipients.  Then I tried sending it as a bulk mail to nine recipients.  Submitted it, went to Scheduled jobs, executed the "send outbound mail" job.  After chugging along for a while, I got this:
  
  Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider ...
  DB Error: no database selected
  
  Should I give up on CiviCRM? Or my hosting service?
Comments.UserDisplayName: David Hyman
Tags: <email><mailing><links>
Title: is there a maximum number of links permitted in an outbound email?
ThreadText: # is there a maximum number of links permitted in an outbound email?
  
  (Asked by: username_0 on 2020-04-30)
  
  Using WordPress 5.4 and CiviCRM Version 5.18.4. CiviMail has been working fine, mostly, using Mail().
  This problem is seen when sending mail to an individual from their contact page, or when sending a test mail of what will hopefully be a bulk mailing.
  
  One particular email message fails to send. It is fairly long, and the content is fairly complex, with lots of links and some standard html formatting.
  
  When sending, I get either "An error occurred when CiviCRM attempted to send an email (via SMTP). ... The mail library returned the following error message: mail() returned failure" OR (if a "test" mailing) "Could not identify any recipients. Perhaps the group is empty?"
  
  I searched the html source for anything weird, but found nothing. I can send the entire content in small pieces, but when I put them all together, it fails. I can send the entire content as plain text. It's possible that there is some other reason for the odd pattern of failures, but "too much content" or "too many links" seems like a possible one. But I don't see anything about it in documentation.
  
  Has anyone seen something like this? Any other troubleshooting steps you can suggest to pinpoint the problem? Thanks!
  
  **Tags:** email, mailing, links
  
  > **Comments:**
  > **username_1**: "I can send the entire content in small pieces" do you mean you successfully sent part of mailing out to the group? just to rule out the problem relating to the Group itself  
  > **username_0**: No, I mean broke the text of the message into pieces.  Well, actually I deleted large portions of the email before sending the test message, and it sent the smaller version ok to the test recipient(s).  I would try again, removing a different portion of the content, and it would still go out OK, until I had sent every word of the message successfully.  But send the whole message?  Error..  
  > **username_1**: so the error is even when sending Test msg?  
  > **username_0**: Yes, either when sending the message to individuals from their Contact screen, OR when preparing a draft bulk mailing and sending a test message (to one person or a small test group.   For what it is worth, I eventually gave up and edited down the message until it was smaller and had fewer links, and now it seems to send out ok.  I would still very much like to know if this limitation is known to exist.   Could it be a "timing out" issue?  
  > **username_1**: and you are sure it is the number of links rather than the overall length? ie if you send out a msg with just as many actually characters but with fewer links does it work? (as in count the characters of the 'source' of the mail so it includes all the html characters too)  
  > **username_0**: Yes, I did test that way too.  But as I said, I have now shortened the message, removed links, and it went out ok as a test, AND when I sent it as a bulk mail to three recipients.  Then I tried sending it as a bulk mail to nine recipients.  Submitted it, went to Scheduled jobs, executed the "send outbound mail" job.  After chugging along for a while, I got this:  Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider ... DB Error: no database selected  Should I give up on CiviCRM? Or my hosting service?  
  
  ---
  
  ## 0 answers
  
  