From bfd5c5314ef9083dee190d11abe7847e388cc82b Mon Sep 17 00:00:00 2001 From: Tabrez Shaikh Date: Thu, 4 Feb 2021 15:30:22 +0530 Subject: [PATCH] Changed accounts api to send email in readme --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e834b2c..fc0cf14 100644 --- a/README.md +++ b/README.md @@ -58,14 +58,23 @@ configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY' # configuration.api_key_prefix['X-Auth-Token'] = 'Bearer' # create an instance of the API class -api_instance = MimePost.AccountsApi(MimePost.ApiClient(configuration)) +api_instance = MimePost.EmailsApi(MimePost.ApiClient(configuration)) + +to_email = MimePost.EmailTo(email = "to@example.com"); + +body = MimePost.Email( + subject = "Test email sent using MimePost Python SDK", + from_email = "from@example.com", + html = "

This is a body of the test email sent using MimePost Python SDK

", + to = [to_email], +) # Email | Single Email object try: - # Get account profile details - api_response = api_instance.account_profile_get() + # Send email + api_response = api_instance.send_email(body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountsApi->account_profile_get: %s\n" % e) + print("Exception when calling EmailsApi->send_email: %s\n" % e) ```