Hello,

if your email goes to spam and you are using gmail / suite here some email settings that fixed my problems!

create a gmail business account
make all the setup with dns,mx,txt etc.
add extra spf,DKIM ....

1.enable low secure apps
Enabling less secure apps to access Gmail
Open your Google Admin console (admin.google.com).
Click Security > Basic settings .
Under Less secure apps, select Go to settings for less secure apps .
In the subwindow, select the Enforce access to less secure apps for all users radio button. ...
Click the Save button.

2. create app password for gmail (this is an alternative password for your gmail account)
Create & use App Passwords
Go to your Google Account.
Select Security.
Under "Signing in to Google," select App Passwords. You may need to sign in. ...
At the bottom, choose Select app(mail) and choose the app you using Select device and choose the device you're using. ...
Follow the instructions to enter the App Password. ...
Tap Done.


3. I use php (no gmail, no smtpauth) as send method in admin->configuration->email options
the other settings there are smtp.gmail.com and port 587
my email address
for my email password i used the app password (2.)

5. You must add the ip address (ipv4 or ipv6) of your website in the dns settings and in whitelist in gmail settings
How to do that:
a. send an email for password forgotten for example to another gmail account of you
b. open the email with the new password in your spam folder and up right you click on the 3 dots and click show original message
there you can see something like this...
SPF: SOFTFAIL with IP 2a01:8740:ffff:fffb:0:d9ff:feae:ffff
so my ipv6 must be added in gmail suite whitelist and in dns setting

6. go to admin google console
Apps

Google Workspace

Settings for Gmail

Spam, phishing, and malware
Email whitelist

and add your ip (ipv4 or ipv6 )in this format

IPv4
108.177.16.0/24

or

IPv6
2a01:8740:ffff:fffb:0:d9ff:feae:ffff/126

so you need add /24 if you use ipv4 at the end or /126 if you use ipv6

save

wait some minutes or see the audit log that your setting are saved
google admin - Reports

Audit log

Admin

7. need to add your ip in dns settings

where TXT exists add this v=spf1 include:_spf.google.com ~all

add this next ;v=spf1 ipv4 or ipv6 -all


for example
v=spf1 include:_spf.google.com ~all; v=spf1 ip6:2a01:8740:ffff:fffb:0:d9ff:feae:ffff -all

or
v=spf1 include:_spf.google.com ~all;v=spf1 ip4:175.175.101.101 -all

What’s the difference between ~all and -all

thats it your gmail not going to smap anymore!

hope to help some people with this.