Send Email Through Python Console With Gmail, Hotmail And Yahoo

Python programming language has own built-in library that can easily send mail with Gmail, Hotmail And yahoo mail ID.Python has smtplib for perform this type of method.



Above table show Email Providers and Their SMTP server.

Now Firstly we send Email Through Gmail ID to any other Email ID.

Using Gmail ID

  1. Firstly open command prompt and type python to open terminal of python programming as below image that tell you whole process of sending Email.

    • import smtplib
    • conn =smtplib.SMTP('smtp.gmail.com',587)
    • type(conn)
    • conn.ehlo()
    • conn.starttls()
    • conn.login('Email ID','password')
    • conn.sendmail('from','CcBcc','Subject:')
    • conn.quit()


  2. Now I check on Gmail send Email and get as below image.



  3. Now Check Hotmail Account Where I send Email .

So we can apply On this as Hotmail.com

Hotmail.com

  1. Repeat all step as same but change SMTP server name.
  2. Now send mail.
  3. I check Hotmail when I send mail.





  4. In Gmail.

So we can send mail according to given above table on computer wit hour access Email ID from browser.