Skip to content

smtp to symfony lite update - #27

Open
protitude wants to merge 1 commit into
2.0.xfrom
m-1343
Open

smtp to symfony lite update#27
protitude wants to merge 1 commit into
2.0.xfrom
m-1343

Conversation

@protitude

@protitude protitude commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Describe context / purpose for this PR

Move from smtp to symfony_mailer_lite

Issue link

https://github.com/UCBoulder/oit_dingo/issues/1343

Any other related PRs?

Link to MultiDev instance

http://md-1343-ucbsub-oit.pantheonsite.io

Checklist for PR author

  • I have checked that the PR is ready to be merged
  • I have reviewed the DIFF and checked that the changes are as expected
  • I have assigned myself or someone else to review the PR

Copilot AI 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.

Pull request overview

This PR supports the migration from drupal/smtp to symfony_mailer_lite by reintroducing a “force From address” behavior at the Drupal mail API layer to satisfy Office 365 sender authorization requirements.

Changes:

  • Adds oit_mail_alter() to force the From address to oitsrvcom@colorado.edu on all outgoing mail.
  • Adds default Reply-To: oithelp@colorado.edu when not explicitly set by another module.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread oit.module
Comment on lines +638 to +640
$from = 'Office of Information Technology <oitsrvcom@colorado.edu>';
$message['from'] = 'oitsrvcom@colorado.edu';
$message['headers']['From'] = $from;
Comment thread oit.module
Comment on lines +641 to +642
$message['headers']['Sender'] = 'oitsrvcom@colorado.edu';
$message['headers']['Return-Path'] = 'oitsrvcom@colorado.edu';
Comment thread oit.module
Comment on lines +637 to +645
function oit_mail_alter(&$message) {
$from = 'Office of Information Technology <oitsrvcom@colorado.edu>';
$message['from'] = 'oitsrvcom@colorado.edu';
$message['headers']['From'] = $from;
$message['headers']['Sender'] = 'oitsrvcom@colorado.edu';
$message['headers']['Return-Path'] = 'oitsrvcom@colorado.edu';
if (empty($message['headers']['Reply-To'])) {
$message['headers']['Reply-To'] = 'oithelp@colorado.edu';
}
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