Email alerts not working

So I followed a guide and installed ssmtp and then successfully sent an email to myself via:
echo “E-Mail using the command-line” | ssmtp
Now I am trying to setup Grafana to send email alerts, but I fail.
I use my own paid hosting smtp server btw.

In Notification channels in the web gui I have added in Addresses.

enabled = true
host = mail.server:465
user =
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
password = password
;cert_file =
;key_file =
skip_verify = true
from_address =
from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity =
# SMTP startTLS policy (defaults to 'OpportunisticStartTLS')
;startTLS_policy = NoStartTLS

Error log:
t=2020-12-14T23:29:09+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Failed to send notification to email addresses: dial tcp: lookup mail.server: no such host" remote_addr=

Error log doesn’t list 465 port after the host name, which I find odd (Grafana server restarted many times)
Usernames and host names altered for privacy.

Any ideas?

I actually found my mistake, which was pretty stupid.
Forgot to put .com in the hostname
host = mail.server:465
host =