In response to the answers to this question I tried to set up the correct 'from', 'sender' and 'return-path'. I am not sure how this is set up in .net (particularly 'return-path'), but I have set the following:
mail.From = email@client.com;
mail.ReplyTo = email@client.com;
mail.Sender = email@mycompany.com;
I set up an spf record on my dns, but then I was getting some 550 errors and emails being failed to be delivered. (Most emails were delivered, but only some returned 550 errors).
When I researched the error I found that it might be caused by the spf not containing the domain of 'From' email address?
Or perhaps my client's email server needs to have a valid spf record?
Or should I use the 'include' statement in my spf record and include my clients domain? This might be impractical as I may have up to 100 clients and the spf record is limited to 255 chars.
Or maybe I have set up the email object incorrectly?
Or is my domain supposed to be in the spf record stored on the companies server for which I am sending emails on their behalf?