πŸ‡ΊπŸ‡ΈUnited States @chipcleary

Account created on 2 December 2008, over 15 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States chipcleary

Super, thanks @AdamPS. Let me know if there's anything else you'd like.

πŸ‡ΊπŸ‡ΈUnited States chipcleary

Helpful feedback, thanks. Here's an updated patch. Would you be able to check in particular whether I've addressed #4 appropriately? I'm least confident about that one.

πŸ‡ΊπŸ‡ΈUnited States chipcleary

@AdamPS, here's a stab at the patch. Happy to make modifications.

I extended the email to include:

  • A header and footer, which use custom CSS for formatting.
  • A "day" variable which captures day of the week.

To implement this, I modified:

  • symfony_mailer.libraries.yml
  • TestEmailBuilder.php
  • symfony_mailer.mailer_policy.symfony_mailer.test.yml

And I added test.email.css.

πŸ‡ΊπŸ‡ΈUnited States chipcleary

@AdamPS, glad you like it and I'd be happy to provide a patch! I should be able to provide it by the end of the week.

πŸ‡ΊπŸ‡ΈUnited States chipcleary

Thanks @AdamPS for providing Symfony Mailer!

In case it is useful for others, as I played with using Symfony Mailer to create my first custom email using it, I developed a "Hello World" email example module. See here: https://github.com/chipcleary/symfony_mailer_example/blob/main/README.md.

This provides a basic example of how to programmatically define and send custom mail, including:

  • Defining a custom EmailBuilder
  • Providing and using twig variables
  • Providing a mailer policy
  • Providing CSS

All of this is already covered in the existing documentation β†’ . But it took me some hunting-and-pecking to identify which parts I needed and how to apply it.

Caveats:

  • I'm a novice developer and am unfamiliar with Symfony Mailer. I wrote this as I worked through how to create a first custom email. It's only meant to provide a minimal "starterkit" example. It is emphatically *not* authoritative.
  • It does not address either of the two examples used in the issue statement, which are a step more advanced (theming system emails, sending attachments).
Production build 0.69.0 2024