Hi,
I am using mailgun libraries to send mail from my web2py application,I 
followed example given in mailgun site mailgun.com:


   1. requests.post(("https://api.mailgun.net/v2/samples.mailgun.org/messages";),
   2.     auth=("api", "key-3ax6xnjp29jd6fds4gc373sgvjxteol0"),
   3.     data={
   4.             "from": "Excited User <[email protected]>",
   5.             "to": ["[email protected]",
   6.                    "[email protected]"],
   7.             "subject": "Hello",
   8.             "text": "Testing some Mailgun awesomeness!"})


but when i am using the above code, web2py gives error "NameError: global 
name 'requests' is not defined", what is this requests variable and how to 
initialize it?OR do i need to use some other libraries which already has 
this variable to make use of it.

Please guide me to resolve this issue.
 

-- 



Reply via email to