Python Forum
Mail sending Python - What it's wrong?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mail sending Python - What it's wrong?
#2
Check your line 16:
msg['To'] = send_to_email
I'm afraid that send_to_email is a list here and msg['To'] is expecting a string.
You can test it passing just a dummy email ([email protected]).
If this is the error and you still want to mail every email on this list (send_to_email) you'll have to iterate through it and send one at time.
Reply


Messages In This Thread
RE: Mail sending Python - What it's wrong? - by gontajones - Jan-30-2019, 03:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending a text from Python sawtooth500 2 198 Apr-14-2024, 01:56 PM
Last Post: sawtooth500
  Am I wrong or is Udemy wrong? String Slicing! Mavoz 3 2,579 Nov-05-2022, 11:33 AM
Last Post: Mavoz
  Sending string commands from Python to a bluetooth device Rovelin 13 9,536 Aug-31-2021, 06:40 PM
Last Post: deanhystad
  Mail issue Mihil 3 2,674 Dec-03-2020, 05:25 AM
Last Post: Mihil
  Sending Out Email via Python JoeDainton123 1 4,793 Aug-31-2020, 12:54 AM
Last Post: nilamo
  Python sockets : Client sending to the server nico31780 0 2,350 May-17-2020, 07:56 PM
Last Post: nico31780
  problems sending BIN file with XMODEM python shaya2103 0 2,844 Nov-23-2019, 10:27 AM
Last Post: shaya2103
  python gives wrong string length and wrong character thienson30 2 3,025 Oct-15-2019, 08:54 PM
Last Post: Gribouillis
  smtplib mail without subject anna 2 2,486 Apr-24-2019, 05:44 AM
Last Post: anna
  Mail Faiyaz 1 26,461 Sep-24-2018, 02:29 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020