I have created API key for sendGrid:
I have following spring mail configuration:
spring.mail.default-encoding=UTF-8 spring.mail.host=smtp.se
I used the port 2525 (Non-privileged) instead of 578 (privileged) to solve the problem locally. I can still use the privileged one on the cloud. That solved my problem.