I made a TYPO – larry@garfieldtech.com

I made a TYPO

Submitted by Larry on 5 May 2021 – 4:55pm

I am a firm believer in “anything worth doing is worth doing right.” So when given the opportunity to get paid to do that, it’s hard for me to say no. Which is why I didn’t.

I am happy to report that this is my first week in my new role as Staff Engineer on the TYPO3 core contributors team.

Continue reading on PeakD.

Laravel: Marking notification e-mails as automatically submitted – Christian Weiske

Process mails from web applications like e-mail address verification and password reset mails should be tagged as “automatically submitted” so that mail servers do not respond with “Out of office” or vacation notification mails.

The official standard for that is RFC 3834: Recommendations for Automatic Responses to Electronic Mail, which defines an e-mail header Auto-Submitted: auto-generated for our use case.

Laravel notifications

E-mails automatically built from Laravel notifications can be modified to contain that header: Inside the toMail() method, register a modification callback for the MailMessage class:

namespace App\Notifications; class ResetPassword extends \Illuminate\Notifications\Notification
{ /** * Build the mail representation of the notification. * * @param mixed $notifiable * @return MailMessage */ public function toMail($notifiable) { return (new \Illuminate\Notifications\Messages\MailMessage) ->withSwiftMessage([$this, 'addCustomHeaders']) ->subject(_('Reset your password')); } /** * Add our own headers to the e-mail */ public function addCustomHeaders(\Swift_Message $message) { $message->getHeaders()->addTextHeader('Auto-Submitted', 'auto-generated'); }