Sending Email With SMTP python

Sending Email With SMTP python

Hi, I am trying to send email with stmplib python lib. 

Code...

server = smtplib.SMTP_SSL('smtp.zoho.com', 465)
server.login('username','password')
server.sendmail('from_mail','to_mail', 'message')
server.quit()

Log 

send: 'ehlo [127.0.1.1]\r\n'
reply: '250-mx.zohomail.com Hello [127.0.1.1] (128.199.171.83 (128.199.171.83))\r\n'
reply: '250-AUTH LOGIN PLAIN\r\n'
reply: '250 SIZE 53477376\r\n'
reply: retcode (250); Msg: mx.zohomail.com Hello [127.0.1.1] (128.199.171.83 (128.199.171.83))
AUTH LOGIN PLAIN
SIZE 53477376
send: 'AUTH PLAIN AHZhbXNpQGZvcmFiZXR0ZXJqb2IuaW4AQVBmb3JkNjY2\r\n'
reply: '235 Authentication Successful\r\n'
reply: retcode (235); Msg: Authentication Successful
send: 'mail FROM:<vamsi@forabetterjob.in> size=28\r\n'
reply: '250 Sender <vamsi@forabetterjob.in> OK\r\n'
reply: retcode (250); Msg: Sender <vamsi@forabetterjob.in> OK
send: 'rcpt TO:<mannemvamsi@gmail.com>\r\n'
reply: '250 Recipient <mannemvamsi@gmail.com> OK\r\n'
reply: retcode (250); Msg: Recipient <mannemvamsi@gmail.com> OK
send: 'data\r\n'
reply: '354 Ok Send data ending with <CRLF>.<CRLF>\r\n'
reply: retcode (354); Msg: Ok Send data ending with <CRLF>.<CRLF>
data: (354, 'Ok Send data ending with <CRLF>.<CRLF>')
send: 'SOMECONENTE TO SEND VIA BIOT\r\n.\r\n'


After couple of minutes it says "connection unexpectedly closed". Could you please help if anything required while sending email like this ?



    • Sticky Posts

    • Workplace - Zoholics Europe Customer Awards

      Dear Zoho Mail Community! 📣 We're excited to announce that at this year's Zoholics events across Europe, we're holding customer awards for the first time ever! Workplace - Zoholics Europe Customer Awards This is your chance to shout about the amazing
    • Important update on Group Management | Zoho Mail

      Dear Zoho Mail Community, This post is to inform you all of the following updates on the Group Management in Zoho Mail. Group Member Addition: If a group member is added to an organization group in a Zoho Application, the member will be automatically
    • Zoho Mail POP & IMAP Server Details

      Hello all! We have been receiving a number of requests regarding the errors while configuring or using Zoho Mail account in POP/ IMAP clients. The server details vary based on your account type and the Datacenter in which your account is setup. Ensure
    • Mastering email etiquette and best practices to follow in Zoho Mail

      Hello Zoho Mail Community, We’re thrilled to invite you all to our upcoming webinar: Mastering email etiquette and best practices to follow in Zoho Mail. Join our live webinar for expert etiquette tips to enhance your professionalism and elevate your
    • 📣 📣 ZUG Meetups India - Explore Hybrid Workspaces using Zoho Workplace - Meet and Learn! 🧑🏽‍💻🧑🏽‍💻

      We are excited to announce the User Community initiative to meet you all in person and help you explore the need of the hour - Hybrid Workspaces using Zoho Workplace. We aim to help you to setup your Digital Workplace effectively so that your employees