def send_mail(from_addr, to_addr, subject, body):
    cmdline = ['/usr/sbin/sendmail', '-f']
cmdline.append(from_addr)
cmdline.append(to_addr)
mailer = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess
    .PIPE)
Django sending email