← Back to team overview

sikuli-driver team mailing list archive

[Bug 1380637] [NEW] [request] want to send an email over SSL using some smtplib module

 

Public bug reported:

Basically i want to send a email when I find a particular image ,

so my algorithm goes something like

if exists(IMG):
 send email 
 exit(0); 

So for past few hours I was working on email script and I'm not find any
luck.

import smtplib
to = 'srkt@xxxxxxxxx'
gmail_user = 'srkt2@xxxxxxxxx'
gmail_pwd = 'Games@10'
smtpserver = smtplib.SMTP("mail.gmail.com")      #the smtp used is just a example not the 1 I'm using in real script.
smtpserver.ehlo()
smtpserver.starttls()                   # HERE Is the place where is shows the error 
smtpserver.ehlo
smtpserver.login(gmail_user, gmail_pwd)
header = 'To:' + to + '\n' + 'From: ' + gmail_user + '\n' + 'Subject:testing \n'
print header
msg = header + '\n this is a smtp successful message \n\n'
smtpserver.sendmail(gmail_user, to, msg)
print 'done!'
smtpserver.close()


I get a error like 
[error] socket.sslerror ( (-1, 'SSL handshake exception: Differences between the SSL socket behaviour of cpython vs. jython are explained on the wiki: http://wiki.python.org/jython/NewSocketModule#SSL_Support') )

I went through document and I had no luck, can someone correct me

** Affects: sikuli
     Importance: Medium
     Assignee: RaiMan (raimund-hocke)
         Status: In Progress

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
   Importance: Undecided => Medium

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.2.0

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1380637

Title:
  [request] want to send an email over SSL using some smtplib module

Status in Sikuli:
  In Progress

Bug description:
  Basically i want to send a email when I find a particular image ,

  so my algorithm goes something like

  if exists(IMG):
   send email 
   exit(0); 

  So for past few hours I was working on email script and I'm not find
  any luck.

  import smtplib
  to = 'srkt@xxxxxxxxx'
  gmail_user = 'srkt2@xxxxxxxxx'
  gmail_pwd = 'Games@10'
  smtpserver = smtplib.SMTP("mail.gmail.com")      #the smtp used is just a example not the 1 I'm using in real script.
  smtpserver.ehlo()
  smtpserver.starttls()                   # HERE Is the place where is shows the error 
  smtpserver.ehlo
  smtpserver.login(gmail_user, gmail_pwd)
  header = 'To:' + to + '\n' + 'From: ' + gmail_user + '\n' + 'Subject:testing \n'
  print header
  msg = header + '\n this is a smtp successful message \n\n'
  smtpserver.sendmail(gmail_user, to, msg)
  print 'done!'
  smtpserver.close()

  
  I get a error like 
  [error] socket.sslerror ( (-1, 'SSL handshake exception: Differences between the SSL socket behaviour of cpython vs. jython are explained on the wiki: http://wiki.python.org/jython/NewSocketModule#SSL_Support') )

  I went through document and I had no luck, can someone correct me

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1380637/+subscriptions


Follow ups

References