def sendmail(self, From, rcpt_to, msg, mopts=None, rcptopts=None):
        from pycopia import proctools
        cmd = "/usr/sbin/sendmail"
        for rcpt in rcpt_to:
            cmd += ' "%s"' % rcpt
        proc = proctools.spawnpty(cmd)
        proc.write(msg)
        proc.write("\n")
        proc.send_eof()
        proc.wait()
        return proc.exitstatus


# global configuration
dataset/ETHPy150Open kdart/pycopia/core/pycopia/ezmail.py/LocalSender.sendmail/original