You should use a SMTP server which is allowed to send mails for the sender's domain. For example if the sender's mail address is john@example.com then the IP address of the SMTP server should be mentioned in the SPF record of the domain example.com.
In other words: Don't send in the name of gmail.com or other domains which are not in your hand because most of the mail servers out there will put such kind of mails directly into the spam folder or simply do not receive them at all.
So when my customer registers his domain with domainname.shop I can add the IP-address to the 'DNS(etc.)settings for hisdomain.com and send the email from post@hisdomain.com – and I will get less mail going to spam (etc) (?)
This site is work in progress, but adding a mail account for the customer ( post@customersdomanin.com) and using that instead of their gmail account seems to help a lot ( for example if I send it to me).