You are viewing our Forum Archives. To view or take place in current topics click here.
Python email help
Posted:

Python email helpPosted:

-__
  • Ladder Climber
Status: Offline
Joined: Oct 19, 201311Year Member
Posts: 358
Reputation Power: 17
Status: Offline
Joined: Oct 19, 201311Year Member
Posts: 358
Reputation Power: 17
Hello all. I'm very new to Python and I have been messing about with sending emails using Python and I want to know how to send multipli emails to the same reciver by just running the program once.

Any ideas welcome.


Thanks, -__
#2. Posted:
tortuga
  • Fairy Master
Status: Offline
Joined: Dec 25, 200914Year Member
Posts: 2,314
Reputation Power: 1686
Status: Offline
Joined: Dec 25, 200914Year Member
Posts: 2,314
Reputation Power: 1686
I'm sure if you've figured out how to use Python modules, you've certainly heard of a loop before!

Encase your current code in a function, say send_email().

Then to send five emails, we have

for _ in range(5):
    send_email()
#3. Posted:
-__
  • Ladder Climber
Status: Offline
Joined: Oct 19, 201311Year Member
Posts: 358
Reputation Power: 17
Status: Offline
Joined: Oct 19, 201311Year Member
Posts: 358
Reputation Power: 17
Thank you! I just wasn't sure if ForLoops would work. Once again, thankyou very Much for your help.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.