Answers.Body: <p>I think that this is probably a limitation in G Suite. I have certainly not been able to send more than about 100 messages at a time using the G Suite SMTP relay.  I think the section on sending limits is relevant <a href="https://support.google.com/a/answer/2956491?hl=en" rel="nofollow noreferrer">https://support.google.com/a/answer/2956491?hl=en</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-01T13:59:09.340Z
Answers.Text: Thanks for that info -- I switched to the SMTP relay after I posted the question and read up on the limits, and given our number of user accounts my best guess is we ran into the "within a 10-minute window" limitation. Do you know if I adjust the CiviMail settings do those apply to the thank you letters such that I could do the batch once and they'd get queued up, or do those only apply to mailings done directly in CiviMail? If the latter I guess I'll just have to batch these or figure out another SMTP server to send them through. Thanks!
Answers.UserDisplayName: Matt Woodward
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-01T16:25:24.043Z
Answers.Text: I'm not certain about this, but I don't think that emails go via CiviMail. Its interesting that it knows when that the individual emails have failed and routes those users to pdf instead, which certainly suggests its not going through CiviMail.
Answers.UserDisplayName: Mick Kahn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-01T16:49:10.003Z
Answers.Text: Thanks, that helps. I decided to look into using Amazon SES SMTP, but now I'm running into a character limit in the password field on the outgoing mail settings page, so I'll report that as something that should be changed. :-) Really appreciate the thoughts on this.
Answers.UserDisplayName: Matt Woodward
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-01T16:51:24.313Z
Answers.Text: Scratch comment on the password limit, that's just a visual thing. Seems to all be there if I do inspect element.
Answers.UserDisplayName: Matt Woodward
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-01T17:01:44.067Z
Answers.Text: Will be interested to hear how you get on with the Amazon option. I've had all sorts of trouble with various SMTP options. First off was mail being marked as spam and SparkPost didn't seem to work well for small volumes. The sendmail on my host provider is limited to a low throughput. The throttling on CiviMail works fine, but I wonder if I send blocks of membership reminders I may run into similar problems.
Answers.UserDisplayName: Mick Kahn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-09T19:19:27.797Z
Answers.Text: I wound up doing Amazon SES SMTP with domain validation and that seems to be working quite nicely. We're on the "basic support" option so you start in the sandbox and do have to request limit increases, but they did that in a couple of days and we can send 50k/day and 14/sec which is plenty for our needs. I also looked into MailGun since their "pay as you go" option would be fine for us, but Amazon is cheaper and since we're already using LIghtSail, CloudFront, etc. this kept it all under one umbrella. So far so good!
Answers.UserDisplayName: Matt Woodward
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-01T08:16:27.113Z
Answers.LastActivityDate: 2019-02-01T08:16:27.113Z
Answers.UserDisplayName: Mick Kahn
Body: <p>I'm on CiviCRM 5.9 on WordPress. We just did our first batch of year-end contribution summary letters, and ran into an issue when choosing the "Send emails where possible. Generate printable PDFs for contacts who cannot receive email" option. We have a total of about 550 letters/emails to send.</p>
  
  <p>We're using G Suite as the SMTP server, and in looking at the logs, it looks like Google started rejecting the emails after about 100 or so had been sent. The resultant PDF of letters wound up with about 450 pages, including many contacts who do have email addresses (and therefore should have been sent an email).</p>
  
  <p>Since this is my first time doing this and we don't send out any other bulk emails, I took at look at the CiviMail settings and they're all set to the defaults (0 across the board), which is I assume what caused the issue. But I wasn't sure if the specific "Thank You Letters" function actually used those settings or not.</p>
  
  <p>For reference here's the error message in the logs:</p>
  
  <p><code>Jan 31 15:29:08  [info] Ignoring exception thrown by nullHandler: 10004, Failed to set sender: EMAIL_ADDRESS_HERE [SMTP: Invalid response code received from SMTP server while sending email.  This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM &gt;&gt; Global Settings &gt;&gt; Outbound Email (SMTP). (code: 421, response: 4.7.0 Try again later, closing connection. (MAIL) z7sm8172274pga.6 - gsmtp)]</code></p>
  
  <p>I verified the settings are correct, and I can send test emails from the settings page fine, but my guess is I triggered a block on the Google side, so I wanted to make sure that if I update the settings and try again that those actually apply to this particular task.</p>
  
  <p>As for the actual settings for Google, I came across these:
  <a href="https://civicrm.stackexchange.com/questions/22707/questions-about-mailer-settings-suggested-g-suite-settings">Questions About Mailer Settings - Suggested G Suite settings?</a></p>
  
  <p>Are those good settings? Anyone else using G Suite as SMTP have any other advice on settings, particularly as relates to sending out Thank You letters?</p>
  
  <p>Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-01T08:19:05.303Z
Comments.Text: I'm interested in the "send emails where possible, generate PDFs otherwise" option. I didn't know you could do this as one task. Is this in the standard distribution, an extension of something you have written. I'd find it very useful.
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-01T09:50:32.943Z
Comments.Text: Ignore last comment - found it now and I can see it only applies for contributions which is why I haven't spotted it before. Would like something like this for membership reminders, but that's another question.
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-01T13:59:29.050Z
Comments.Text: That would indeed be handy for membership reminders!
Comments.UserDisplayName: Matt Woodward
Tags: <civimail><g-suite>
Title: SMTP errors with "Thank You Letters - print or email" -- does this use CiviMail settings?
ThreadText: # SMTP errors with "Thank You Letters - print or email" -- does this use CiviMail settings?
  
  (Asked by: username_0 on 2019-02-01)
  
  I'm on CiviCRM 5.9 on WordPress. We just did our first batch of year-end contribution summary letters, and ran into an issue when choosing the "Send emails where possible. Generate printable PDFs for contacts who cannot receive email" option. We have a total of about 550 letters/emails to send.
  
  We're using G Suite as the SMTP server, and in looking at the logs, it looks like Google started rejecting the emails after about 100 or so had been sent. The resultant PDF of letters wound up with about 450 pages, including many contacts who do have email addresses (and therefore should have been sent an email).
  
  Since this is my first time doing this and we don't send out any other bulk emails, I took at look at the CiviMail settings and they're all set to the defaults (0 across the board), which is I assume what caused the issue. But I wasn't sure if the specific "Thank You Letters" function actually used those settings or not.
  
  For reference here's the error message in the logs:
  
  `Jan 31 15:29:08 [info] Ignoring exception thrown by nullHandler: 10004, Failed to set sender: EMAIL_ADDRESS_HERE [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 421, response: 4.7.0 Try again later, closing connection. (MAIL) z7sm8172274pga.6 - gsmtp)]`
  
  I verified the settings are correct, and I can send test emails from the settings page fine, but my guess is I triggered a block on the Google side, so I wanted to make sure that if I update the settings and try again that those actually apply to this particular task.
  
  As for the actual settings for Google, I came across these:
  [Questions About Mailer Settings - Suggested G Suite settings?](https://civicrm.stackexchange.com/questions/22707/questions-about-mailer-settings-suggested-g-suite-settings)
  
  Are those good settings? Anyone else using G Suite as SMTP have any other advice on settings, particularly as relates to sending out Thank You letters?
  
  Thanks!
  
  **Tags:** civimail, g-suite
  
  > **Comments:**
  > **username_1**: I'm interested in the "send emails where possible, generate PDFs otherwise" option. I didn't know you could do this as one task. Is this in the standard distribution, an extension of something you have written. I'd find it very useful.  
  > **username_1**: Ignore last comment - found it now and I can see it only applies for contributions which is why I haven't spotted it before. Would like something like this for membership reminders, but that's another question.  
  > **username_0**: That would indeed be handy for membership reminders!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-02-01. Score: 3 | Accepted answer
  
  I think that this is probably a limitation in G Suite. I have certainly not been able to send more than about 100 messages at a time using the G Suite SMTP relay. I think the section on sending limits is relevant <https://support.google.com/a/answer/2956491?hl=en>
  
  > **Comments:**
  > **username_0**: Thanks for that info -- I switched to the SMTP relay after I posted the question and read up on the limits, and given our number of user accounts my best guess is we ran into the "within a 10-minute window" limitation. Do you know if I adjust the CiviMail settings do those apply to the thank you letters such that I could do the batch once and they'd get queued up, or do those only apply to mailings done directly in CiviMail? If the latter I guess I'll just have to batch these or figure out another SMTP server to send them through. Thanks!  
  > **username_1**: I'm not certain about this, but I don't think that emails go via CiviMail. Its interesting that it knows when that the individual emails have failed and routes those users to pdf instead, which certainly suggests its not going through CiviMail.  
  > **username_0**: Thanks, that helps. I decided to look into using Amazon SES SMTP, but now I'm running into a character limit in the password field on the outgoing mail settings page, so I'll report that as something that should be changed. :-) Really appreciate the thoughts on this.  
  > **username_0**: Scratch comment on the password limit, that's just a visual thing. Seems to all be there if I do inspect element.  
  > **username_1**: Will be interested to hear how you get on with the Amazon option. I've had all sorts of trouble with various SMTP options. First off was mail being marked as spam and SparkPost didn't seem to work well for small volumes. The sendmail on my host provider is limited to a low throughput. The throttling on CiviMail works fine, but I wonder if I send blocks of membership reminders I may run into similar problems.  
  > **username_0**: I wound up doing Amazon SES SMTP with domain validation and that seems to be working quite nicely. We're on the "basic support" option so you start in the sandbox and do have to request limit increases, but they did that in a couple of days and we can send 50k/day and 14/sec which is plenty for our needs. I also looked into MailGun since their "pay as you go" option would be fine for us, but Amazon is cheaper and since we're already using LIghtSail, CloudFront, etc. this kept it all under one umbrella. So far so good!  
  
  ---
  
  