send and email after deployment in jython


Can anybody give me a script to send an email after deployment in jython. I want to include as a function in my existing install script.
Who is Participating?
HonorGodSoftware EngineerCommented:
Something like this should work for you:
import smtplib

sender    = ''
receivers = ['']

message = """From: Me <>
To: "You" <>
Subject: SMTP e-mail test

This is a test e-mail message.

   smtpObj = smtplib.SMTP( 'localhost' )
   smtpObj.sendmail( sender, receivers, message )         
   print 'Message sent successfully.'
except SMTPException:
   print 'Error: unable to send message'

Open in new window

sweety_745Author Commented:
This worked too. U are a Genious!!
HonorGodSoftware EngineerCommented:
Thanks for the grade, points, and compliments. ;-)

Good luck & have a great day.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.