Archive for July, 2008

sending smtp mails from command line (python)

July 10, 2008

First of all, ruby 1.8.x does not have SSL working in SMTP, so forget connecting to smtp.gmail.com. Python and perl have it working beautifully. Here’s a quick example, modified slightly from what I found on the net.
#!/usr/bin/env python
# 2008-07-07 17:33
# use this to send a simple mail from your gmail account
import smtplib
import getpass

def prompt(prompt):
[...]