Sender Policy Framework


I self host invoice ninja and have a question regarding sending mails.
There is 1 recipient where the automatic mails don’t come through.

I use an office 365 as main e-mail account and change the FROM email to this adress. However in order to send the mails I use a different domain with SMTP. This has worked for 99% of my recipients only this 1 I get an error.

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: (email account)
host []
SMTP error from remote mail server after end of data:
550 5.7.1 SPF check failed

So they reject my message because I configured the FROM mail from my other domain that the emails is sending. Is there a possibility to add my office365 as the primary mail sender? And how do I do that or can I only use the SMTP one from the other domain?

I hope this is somewhat clear.
Thanks in advance

The problem here is this:

550 5.7.1 SPF check failed

You cannot send from a different address even thou you authenticate with the correct credentials.

There is an option to set a Reply-To email address in the settings, this may be a workaround, otherwise I don’t think there is a solution

I can’t add the office365 account as sender mail?

if they have smtp servers, i don’t see why not.

Ah I did not know you could do that, I changed it to the smtp servers and now it works indeed.
Thank you very much!