Assume you're using Python-2.x.
You can use the smtplib module to send the email and the csv module to read the csv file.
Besides, to use smtplib, you must have a email address used to send the emails, no matter the email is Yahoo mail or Gmail or whatever else.
Some sample codes read as follows:
#!/usr/bin/python
import csv
import smtplib
from email.mime.text import MIMEText
from email.Header import Header
def sendmail(info_list):
msg = MIMEText(info_list[2], "html", "utf-8")
msg['Subject'] = Header("YOUR SUBJECT", "utf-8")
msg['From'] = "[email protected]"
msg['To'] = info_list[1]
s = smtplib.SMTP("smtp.XXX.com")
s.ehlo()
s.starttls()
s.login("YOUR EMAIL USERNAME", "YOUR EMAIL PASSWORD")
s.sendmail("FROM_WHOM", info_list[1], msg.as_string())
def main():
with open("msg.csv", "rb") as csvfile:
msg_reader = csv.reader(csvfile)
msg_reader.next()
map(lambda x: sendmail(x), msg_reader)
if __name__ == "__main__":
main()