Search code examples
pythonpython-2.7zimbra

Send email from Zimbra in Python


How to send email from Zimbra in Python. This is an example for gmail, is there any example for Zimbra?

Here is info:

Zimbra server : 10.0.0.8

for login email: https:\\10.0.0.8

my test mail: [email protected]


Solution

  • Try using:

    import smtplib
    
     
    
    server = smtplib.SMTP('10.0.0.8', 25)
    
    server.starttls()
    
    server.login("[email protected]", "IAmAStrongPassword")
    
     
    
    msg = "Help me with my math, please!"
    
    server.sendmail("[email protected]", "THE EMAIL ADDRESS TO SEND TO", msg)
    
    server.quit()
    

    Hopefully it will work out for you!