Python

  1. #!/usr/bin/python

  2. import requests

  3. from_email ='example@pepipost.com'

  4. fromname ='Your Name'

  5. api_key ='Your Api Key'

  6. subject ='Test Mail'

  7. recipients ='abc@pepipost.com'

  8. content ='This is my Mail Content'

  9. pepipost= requests.post("http://api.pepipost.com/api/web.send.rest", data={'api_key': api_key,'subject': subject,'fromname': fromname,'from': from_email ,'recipients': recipients ,'content': content })

  10. print(pepipost.status_code, pepipost.reason)