0

For some reason i'm receiving a 200 status code on my MailGun Request but i'm not receiving any email. i checked the documentation multiple times and tried it multiple times but im still not receiving any mail. Please i'll appreciate assistance. Below is my code:

import requests

API_KEY = "*************************************************"
YOUR_DOMAIN_NAME= "https://api.mailgun.net/v3/sandbox*****************************.mailgun.org"

def send_simple_message():
        return requests.post(
            f"https://api.mailgun.net/v3/https://api.mailgun.net/v3/{YOUR_DOMAIN_NAME}/messages",
            auth=("api", API_KEY),
            data={"from": f"Excited User <mailgun@{YOUR_DOMAIN_NAME}",
                  "to": ["**************************@outlook.com"],
                  "subject": "Hello",
                  "text": "Testing some Mailgun awesomness!"})

Thank you

TwistStack
  • 39
  • 6
  • please login to your mailgun dashboard to confirm if your mail got there. If you got a 200 its probably there and if it didnt deliver, You will see the reasons there. – Austyns Jul 20 '20 at 15:58
  • On my dashboard everything's still on 0 – TwistStack Jul 20 '20 at 16:09
  • This detailed description may help you: https://stackoverflow.com/questions/68150905/can-i-send-email-with-mailgun-sandbox-domain-under-my-local-os/68542876#68542876 – FredyWenger Jul 27 '21 at 11:09

1 Answers1

0

If this is all your code, you might miss send_simple_message() after the definition. It seems you built definition without calling it

Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
Ohad Elias
  • 26
  • 2