Page MenuHomePhabricator

Update Mailgun adapter for the new mail adapter API
ClosedPublic

Authored by epriestley on Jan 5 2019, 12:59 PM.
Tags
None
Referenced Files
F19937339: D19959.id.diff
Sun, Apr 12, 9:51 PM
F19879001: D19959.id47670.diff
Tue, Mar 17, 2:08 PM
F19879000: D19959.id47670.diff
Tue, Mar 17, 1:53 PM
F19828498: D19959.id.diff
Mar 9 2026, 7:07 PM
F19828300: D19959.id47646.diff
Mar 9 2026, 5:40 PM
F19824565: D19959.id47646.diff
Mar 8 2026, 12:39 AM
F19824564: D19959.id47646.diff
Mar 8 2026, 12:38 AM
F19774701: D19959.diff
Feb 21 2026, 6:39 PM
Subscribers
None

Details

Summary

Ref T920. Ref T5969. Update the Mailgun adapter for the API changes and add a timeout.

Test Plan

Configured Mailgun as a mailer, sent mail with subject/to/cc/headers/html/attachments using bin/mail send-test.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php
43

Shouldn't this be if (strlen($subject))?

77

Unused variable.

85

Another strlen?

90

Another strlen?

This revision is now accepted and ready to land.Jan 10 2019, 4:32 PM
src/applications/metamta/adapter/PhabricatorMailMailgunAdapter.php
43

As currently written, setSubject('') will generate a Subject: header, which seems more faithful to intent than strlen(). I think this is probably moot in practice and (below) sending a mail with (say) an empty-but-present text body is probably weird/a mistake, but it's technically a valid construction. If there's ambiguity in practice, I think it's likely better resolved at a higher level (during message construction, e.g.)

This revision was automatically updated to reflect the committed changes.