We are excited that you joined our OSS community. Please read about some of the FAQs in the community
This seems to be not related to Loki but a general issue with the configuration. You can do a basic verification by simply testing the above configuration via telnet command.
In your helm chart, please define the SMTP port as well.
You can have a look at this reference post to see what other SMTP settings are required to make it work correctly.