Closed syk1k closed 1 year ago
Hi, We didn't saw that OpenAPI Generator made breaking change to Python generator and released breaking change in our library. Now we have switched to python-prior generator to not make such a breaking change without prior notification.
I have the same error:
File "./sendmail_elasticemail\ElasticEmail\api\emails_api.py", line 15, in
import ElasticEmail from ElasticEmail.api import emails_api from ElasticEmail.model.email_content import EmailContent from ElasticEmail.model.body_part import BodyPart from ElasticEmail.model.body_content_type import BodyContentType from ElasticEmail.model.email_recipient import EmailRecipient from ElasticEmail.model.email_message_data import EmailMessageData from pprint import pprint
configuration = ElasticEmail.Configuration()
configuration.api_key['apikey'] = 'YOUR_API_KEY'
""" Send bulk emails Example api call that sends bulk merge email. """ with ElasticEmail.ApiClient(configuration) as api_client:
api_instance = emails_api.EmailsApi(api_client)
email_message_data = EmailMessageData(
recipients=[
EmailRecipient(
email="johnsmith@domain.com",
fields={
"name": "John",
},
),
],
content=EmailContent(
body=[
BodyPart(
content_type=BodyContentType("HTML"),
content="<strong>Hi {name}!<strong>",
charset="utf-8",
),
BodyPart(
content_type=BodyContentType("PlainText"),
content="Hi {name}!",
charset="utf-8",
),
],
_from="myemail@domain.com",
reply_to="myemail@domain.com",
subject="Example email",
),
) # EmailMessageData | Email data
try:
# Send Bulk Emails
api_response = api_instance.emails_post(email_message_data)
pprint(api_response)
except ElasticEmail.ApiException as e:
print("Exception when calling EmailsApi->emails_post: %s\n" % e)
Any solution to this problem? having same issue here
There no function or class called Endpoint when checked