[Fixed Itself!] Sending mail form script using sSMTP does not work

I have installed sSMTP and set it up to use my gmail.

Sending from cli does work fine:

msg file:

From: test@gmail.com
To test2@gmail.com
Subject: test post
This is a test

Executing from console:

ssmtp -t < msg

does work fine.

But from script it does not work:

#!/bin/sh
ssmtp -t < msg

This does not work either:

#!/bin/sh
ssmtp -t << EOF
From: test@gmail.com
To test2@gmail.com
Subject: test post
This is a test
EOF

---------- Post updated at 15:50 ---------- Previous update was at 14:43 ----------

Edit

Not sure why, but it seems to work now. Can be closed