1

I want to send emails from my Ubuntu PC to other PCs on internet. I also have an account on yahoo.gr,there are some commands like ssmtp or mail or mutt but they don't work for me. Perhaps I should change the files on the folder: /var/mail ?

Lorenz Keel
  • 8,905
teobass
  • 29

1 Answers1

0
  • Install ssmtp Install ssmtp:

    sudo apt-get install ssmtp

  • Edit the ssmtp config file :

    gksu gedit /etc/ssmtp/ssmtp.conf

  • Add these lines in the file and don't forget to edit according to your needs

    root=username@gmail.com
    mailhub=smtp.gmail.com:465
    rewriteDomain=gmail.com
    AuthUser=username
    AuthPass=password
    FromLineOverride=YES
    UseTLS=YES
    
  • Enter the email address of the person who will receive your email:

    ssmtp recepient_name@gmail.com
    
  • Now enter this:

    To: recipient_name@gmail.com
    From: username@gmail.com
    Subject: Sent from a terminal!
    

    ADD you contents here now

  • To send the email:

    Ctrl + D

This links shows you another 4 different methods how to send mail from terminal

Maythux
  • 84,289