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 ?







                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources



                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources


                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources


                                                            Zoho Sprints Resources


                                                              Qntrl Resources


                                                                Zoho Creator Resources


                                                                  Zoho WorkDrive Resources



                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series


                                                                      • Tips

                                                                        Tips

                                                                      • Functions

                                                                        Functions

                                                                      • Meetups

                                                                        Meetups

                                                                      • Kbase

                                                                        Kbase

                                                                      • Resources

                                                                        Resources

                                                                      • Digest

                                                                        Digest

                                                                      • CRM Marketplace

                                                                        CRM Marketplace

                                                                      • MVP Corner

                                                                        MVP Corner

                                                                      





                                                                      




                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now