Ask coding questions

← Back to all posts
HeyDude
PheaktraKim1 (0)

How can I use python to sent email to someone ?

Comments
hotnewtop
OmN3xin (51)
import smtplib
server = smtplib.SMTP('smtp.gmail.com', 587)

#Next, log in to the server
server.login("youremailusername", "password")

#Send the mail
msg = "
Hello!" # The /n separates the message from the headers
server.sendmail("[email protected]", "[email protected]", msg)

take a look here

Spotandjake (28)

@OmN3xin this should be marked as the awnser it is correct lol

PheaktraKim1 (0)

Do you have anydesk or sth else [email protected]

OldWizard209 (1100)

r u using a remote desktop? @PheaktraKim1

OldWizard209 (1100)

Why did u mark my answer as correct @Pheaktrakim1

OldWizard209 (1100)

??? Literally, I just asked him/her/other a question and they my notifs go like: @Pheaktrakim1 accepted ur answer, you got 5 cycles... @IcingHackz