Results 1 to 4 of 4

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

  1. #1

    Default 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" "example@test.com"

    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

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,481
    Blog Entries
    3

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

    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.

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

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

    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.

  4. #4

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

    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://smtp.gmail.com:587
    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' whatever@domain.com


    THANKS A LOT FOR THE HELP !!!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •