Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 1
    I also use ssmtp in my VMs, very lightweight. +1 Commented May 9, 2017 at 2:37
  • 1
    Why not using the sendmail API from Python and sending it directly then? Commented May 10, 2017 at 15:52
  • 1
    To answer Rui's question: sendmail alone does not have the MTA - Mail Transport Agent to communicate outside the machine. By default, since Unixen are multi-user by design, sendmail will send messages to other users in the same box but not outside. ssmtp is the MTA that I think is simplest to configure for gmail. Commented Mar 20, 2018 at 1:22
  • 2
    spent forever trying to setup postix this worked! one note to anyone reading this, the conf has a typo, the root parameter should be gmail.com not gmail. Commented Aug 26, 2018 at 14:55
  • 4
    For Gmail, you now need UseSTARTTLS=Yes and mailhub=smtp.gmail.com:587 and hostname=localhost. Took me hours to get it right :) Commented Apr 20, 2019 at 13:13