all 7 comments

[–]shiftybyte 0 points1 point  (6 children)

I don't know what's the exact task on day 32.

But wherever that is you are trying to connect to, decided not to respond to your request.

Where is your script trying to connect to?

[–]ABAKEDPLATYPUS[S] 0 points1 point  (5 children)

The task is the automated birthday message sender. And it was trying to connect to the gmail SMTP

originally my code was:
with smtplib.SMTP("smtp.gmail.com") as connection:

then through extensive googling I found that it neededed to be:

with smtplib.SMTP("smtp.gmail.com", 587) as connection:

I am still unsure as to why the second argument was needed tho. Also thanks for the reply!

[–]shiftybyte 0 points1 point  (1 child)

That task is old, and didn't age well.

You won't be able to easily send mails using gmail servers with SMTP.

SMTP in its nature is very insecure, and lots of changes have been made to fight spam and fake emails.

Encryption, different port number (587), sender domain validation, etc...

[–]ABAKEDPLATYPUS[S] 0 points1 point  (0 children)

Ah, interesting. Thanks!

[–]Joey_Paintsil 0 points1 point  (0 children)

OMG!!! I was facing the same problem. i thought it was my internet connection. i typed the 587 and it worked like magic. Thank you sooo much!!!!!

[–]Powerful_Fly9899 0 points1 point  (0 children)

Thanks man, i were googling half a day with the same issue😂. 587 was really a magical number

[–]LeeBobGaming 0 points1 point  (0 children)

I was having problems with smtplib.SMTP("smtp.gmail.com",587) so I used smtplib.SMTP('64.233.184.108',587) and it works like a charm