I just assumed from the very first post on this topic that you already had the Python code to send the email and understood how Python worked. This code snippet just demonstrates how to use smpt2go as the sender.is that python?I use smtp2go. It's free for small personal use. If I remember correctly I get 100 emails per day. Enough for my needs.
My email address to send from is an outlook.com one.Code:
server=smtplib.SMTP('mail.smtp2go.com', 2525, timeout=8) server.ehlo() server.starttls() server.ehlo() server.login(CONST.EMAIL_ADDRESS_TO_SEND_FROM, CONST.SMPT2GO_PASSWORD) msg = MIMEMultipart() msg['Subject'] = "Data from Pi (RETRY)" msg['From'] = CONST.EMAIL_ADDRESS_TO_SEND_FROM msg['To'] = CONST.EMAIL_ADDRESS_TO_SEND_TO msg.preamble = "Data from Pi (RETRY)" # Add a short text message listing the minimum and maximum values for the previous 24hour period msg.attach(MIMEText(_allMinMaxValues))
there are no imports if it is python
please tell me more about this code
I signed up for an smpt2go account a few years ago when working with ESP32 devices. I have never had a problem with them selling on my email address to 3rd parties. I don't think that they ever asked for my phone number.
Statistics: Posted by MarkDH102 — Tue Oct 22, 2024 5:54 am