Skip to content

Add Grails 8 email guide (v8 prose, snippets, guides.yml)#524

Open
sanjana2505006 wants to merge 5 commits into
apache:masterfrom
sanjana2505006:grails-email-v8-guide
Open

Add Grails 8 email guide (v8 prose, snippets, guides.yml)#524
sanjana2505006 wants to merge 5 commits into
apache:masterfrom
sanjana2505006:grails-email-v8-guide

Conversation

@sanjana2505006

Copy link
Copy Markdown
Contributor

Adds the Grails 8 email guide under guides/grails-email/v8/ (AsciiDoc chapters + vendored snippets) and registers the v8 version in conf/guides.yml with TOC.

Companion to grails-guides/grails-email#1

@jamesfredley jamesfredley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sanjana2505006! Reviewed the v8 email guide prose plus conf/guides.yml. The good news first: all 12 TOC keys map to chapter files (no orphans), and every include:: snippet path resolves to a vendored snippet. A few things to address before merge. The publication date is fine, please ignore that one.

Inline comments below cover: the guides.yml TOC syntax and author name, the SMTP config filename mismatch, and the injected == Verify CI heading.

One cross-cutting item that is not line-specific:

  • Typography: please remove em/en dashes (the character) throughout. They appear in the subtitle (guides.yml), introduction.adoc (line 1), gettingStarted.adoc (line 17), and summary.adoc (line 7). Replace them with commas, colons, parentheses, or regular hyphens per project style.

  • SMTP config filename (cross-PR): the biggest item is that the mail-config filename must be identical in three places: the sample app (companion PR grails-guides/grails-email#1 currently names it application-development.yml), the vendored snippet here (application-email.yml), and the prose/caption (application.yml). Please reconcile to a single name across both PRs. Details in the inline comment on smtpMail.adoc.

Comment thread conf/guides.yml Outdated
Comment thread conf/guides.yml
Comment thread conf/guides.yml Outdated
Comment thread guides/grails-email/v8/guide/smtpMail.adoc Outdated
Comment thread guides/grails-email/v8/guide/gettingStarted.adoc Outdated
@sanjana2505006

Copy link
Copy Markdown
Contributor Author

@jamesfredley I've updated the code
please have a look and let me know if there's anything else i can do

@jamesfredley

Copy link
Copy Markdown
Contributor

Latest-head re-review: the original feedback is addressed, and I resolved those prior threads. validateGuides -PvalidationMode=both passes and the targeted guide renders and loads cleanly.

A new blocking cross-PR drift remains: the vendored snippets no longer match the companion sample-app head. In particular:

  • resources.groovy still uses AwsSesMailService and silently routes unknown providers to SMTP.
  • SendGridEmailService.groovy still drops the HTML alternative and swallows provider failures.
  • AwsSesMailService.groovy retains the old class name and swallows SES failures.
  • MailController.groovy still returns a bare 422.
  • MailControllerSpec.groovy lacks the added invalid-request cases.

Please fix the remaining companion-PR blockers first, then re-vendor these files from that corrected head and update the AWS filename/include to AwsSesEmailService.groovy.

Comment thread guides/grails-email/v8/snippets/grails-app/conf/application.yml
Comment thread guides/grails-email/v8/guide/gettingStarted.adoc Outdated
Comment thread guides/grails-email/v8/guide/controller.adoc
@sanjana2505006

sanjana2505006 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@jamesfredley, addressed the inline notes.
Please have another look whenever you get a chance and let me know if there's any other requirements

}
this.sesClient = SesClient.builder().region(Region.of(awsRegion)).build()

this.sourceEmail = co.getProperty('aws.ses.source', String, '')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snippet is still the pre-b07505d implementation: it warns and continues when aws.ses.source is missing, and bodyOfEmail still drops the text alternative whenever HTML is present. Please re-vendor the final companion implementation after the sample PR is green; it must fail fast on missing source and preserve both text and HTML.

respond cmd.errors, view: '/application/errors', status: UNPROCESSABLE_ENTITY
return
}
log.info '{}', cmd.toString()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guide still publishes cmd.toString() at INFO, which includes recipient, CC/BCC, subject, and both message bodies. Please re-vendor the final privacy-safe controller from the companion app after its logging fix is complete.


then:
ex != null
ex.statusCode == HttpStatus.UNPROCESSABLE_ENTITY

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This vendored test remains behind the companion head: it still compares against UNPROCESSABLE_ENTITY and only checks that path/links are truthy. Please re-vendor the final green test after the sample app correctly returns and asserts exact /mail/send path and self-link values.


[source,bash]
----
cd complete

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guide previously leaves the reader in grails-email/initial, so this command targets a nonexistent initial/complete directory. Please use cd ../complete, consistent with the corrected Getting Started chapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants