MUTT and GMAIL SMTP RELAY. Issues using mutt from command line

I have installed and configured mutt with gmail with no issues, following this documentation.
Mutt with Gmail/IMAP [CrunchBang Linux Wiki]

I can send emails from mutt, but now I need to send email using scripts.
If I try to use mutt from cmd line I have the following error.

trst:~ # echo “TESTING MUTT AND GMAIL SMTP RELAY” | mutt -s “test” “

SSL connection using TLSv1/SSLv3 (RC4-MD5)
Interactive SMTP authentication not supported
Could not send the message.

Anybody knows a workaround?

The OS version: OPEN SUSE 11.3 Server installation (NO-GUI)

Many thanks

It is very likely that you can setup sendmail to handle that mail sending, and then script sendmail. With sendmail, you would put the authentication info in a file, and configure sendmail to use that file. I don’t know if it is also possible with postscript, since I only use sendmail.

The mailx MUA can be set up to relay to gmail. That’s probably the simplest solution if you are sending from a script. Search for previous posts on this. The postfix MTA can also be set up to relay but that’s probably overkill for what you do.

Mailx worked perfect and the command is pretty similar to mutt (you have to only add -A account, defined in the ~/.mailrc). So I don’t need to re-write all my scripts.
It’s sad the command line doesn’t work anymore in mutt version 1.5.20

To make mailx to work with gmail, just create ~/.mailrc
and enter the follow

account gmail {
set smtp-use-starttls
set smtp=smtp://
set smtp-auth=login
set smtp-auth-user=<username>
set smtp-auth-password=<password>
set from=“Your name <your return address>”

to send via command line
cat “TEXT”| mailx -A gmail -s ‘Subject’