CRutkowski/Kijiji-Scraper

SMTP Error

Closed this issue · 2 comments

I have configured the config.yaml properly, however I get the following SMTP error:

Traceback (most recent call last):
File "./main.py", line 37, in
email_client.mail_ads(ads, email_title)
File "/home/brain1/kijiji_3/Kijiji-Scraper-master/kijiji_scraper/email_client.py", line 26, in mail_ads
server.ehlo()
File "/usr/lib/python3.6/smtplib.py", line 440, in ehlo
self.putcmd(self.ehlo_msg, name or self.local_hostname)
File "/usr/lib/python3.6/smtplib.py", line 367, in putcmd
self.send(str)
File "/usr/lib/python3.6/smtplib.py", line 359, in send
raise SMTPServerDisconnected('please run connect() first')
smtplib.SMTPServerDisconnected: please run connect() first

Hi.....I re-cloned the repo on a fresh OS and tried the setup again. I get the following STMP errors:3

Traceback (most recent call last):
File "main.py", line 43, in
email_client.mail_ads(ads, email_title)
File "/home/user1/kijiji/Kijiji-Scraper/kijiji_scraper/email_client.py", line 28, in mail_ads
server.login(self.username, self.password)
File "/usr/lib/python3.6/smtplib.py", line 730, in login
raise last_exception
File "/usr/lib/python3.6/smtplib.py", line 721, in login
initial_response_ok=initial_response_ok)
File "/usr/lib/python3.6/smtplib.py", line 642, in auth
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (334, b'UGFzc3dvcmQ6')

I have confirmed that I can log into the sender account manually with the username/password in the config.yaml file. I enabled the setting in Gmail to allow "less secure apps" to connect.

Any ideas?

Just an update.....I got this fixed using this link from Google:
https://support.google.com/mail/answer/78754

Thanks again for this great codeE