I am successfully performing some very basic SMTP sending in my machine with a basic Python script:
.... things ... try: smtpObj = smtplib.SMTP('localhost') smtpObj.sendmail(sender, recievers, message.format(now, now)) print "Successfully sent email" except SMTPException: print "Error: unable to send email"
It works fine both in my machine and in a Ubuntu server I have in Virtual Box. Now I would like to send one email from one server using the other server as a host.
I tried in my virtual host to change
smtpObj = smtplib.SMTP('localhost')
smtpObj = smtplib.SMTP('IP of my PC') #IP get from "ifconfig -a"
but does not work.
Am I missing something?