Skip to content

Instantly share code, notes, and snippets.

@marcosan93
Last active August 23, 2021 15:58
Show Gist options
  • Select an option

  • Save marcosan93/258dfaf422b5265aae21718eeda8133f to your computer and use it in GitHub Desktop.

Select an option

Save marcosan93/258dfaf422b5265aae21718eeda8133f to your computer and use it in GitHub Desktop.
# Sending a different email with 3 different greetings
for i in ["Hey", "Hi", "Hello"]:
# Setting the variables to dynamically change
sender = "[email protected]"
recipient = "[email protected]"
subject = f"{i} Check Out My Email!"
content = f"""
{i}!
<p>I just sent this email by using <b>Python</b>.</p>
<p><i>It's so cool!<i/></p>
"""
# Testing the function
sendMyEmail(sender, recipient, subject, content)
# Waiting a bit before sending the next
time.sleep(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment