Scenario: I have a customer A, who authorizes me / my software to send email on their behalf to their customers P, Q, etc.
Additionally, P, Q, etc. should see the email as coming from a.example.com.
And finally, A should be able to see the email I sent on their behalf (e.g. in a 'sent items' folder), receive replies and delivery failures from P, Q, etc., and things like that.
The obvious solution is to directly deliver the emails to A's SMTP server using the From address of a mailbox managed via that server. Authentication is required, of course, to prove "I am [allowed to send email on behalf of] [email protected]." (One disadvantage is the various authentication options that I would need to support, because of course I would also want to support this for my other customers B, C, etc.)
Another solution would be to host a mailbox myself for customer A, and give the customer access to that in some way. (That would open up another can of worms, obviously, since I don't want to be in the mailbox-hosting business.)
My question: Is there perhaps some other solution direction I am missing?
For example, can I tell 'my' SMTP server to send to [email protected] 'via' A's SMTP server / From [email protected]? What kind of SMTP headers would be needed, what configuration would be needed on 'my' SMTP server, and on A's SMTP server? What kind of authentication would be needed, or would having a 'verified email address' (whatever that means exactly) be sufficient?
(Note that 'my' SMTP server is fully under my control. But A's SMTP server might be hosted so A might not have full control of its configuration.)