aegeavaz
aegeavaz
NNovu
Created by aegeavaz on 4/9/2024 in #💬│support
Bad hostname in SES Email integration Provider
Hi, I have configured an email SES integration provider, but when I test it, it failed because the hostname configured by the SES provider is "email.eu-west-01.amazonaws.com", and the smtp endpoint that aws is setting up is 'email-smtp.eu-west-01.amazonaws.com'. Thanks
9 replies
NNovu
Created by aegeavaz on 10/31/2023 in #💬│support
Email attachments
Hi, I'm trying to trigger an event with a file attached and the API is responding with {"statusCode":413,"message":"request entity too large"}. The file is small, its 87Kb. And the length of the json data sent is 132933 (len(json.dumps(data)). This is my python code... Novu v.0.19.0
def send_notification(self, recipient: Recipient, document_name: str, document_file: bytes):
data = {
"name": "notification",
"to": {
"subscriberId": str(recipient.id),
"email": recipient.email,
"firstName": recipient.first_name,
"lastName": recipient.last_name
},
"payload": {
"document":{
"name": document_name,
},
"attachments": [
{
"file": document_file.decode('unicode_escape'),
"name": document_name,
"mime": 'application/octet-stream',
},
],
}

headers = {'Content-Type': 'application/json', 'Authorization': f'ApiKey {settings.NOVU_API_KEY}'}
response = requests.post(url=f"{settings.NOVU_API_URL}/v1/events/trigger", headers=headers, json=data)
def send_notification(self, recipient: Recipient, document_name: str, document_file: bytes):
data = {
"name": "notification",
"to": {
"subscriberId": str(recipient.id),
"email": recipient.email,
"firstName": recipient.first_name,
"lastName": recipient.last_name
},
"payload": {
"document":{
"name": document_name,
},
"attachments": [
{
"file": document_file.decode('unicode_escape'),
"name": document_name,
"mime": 'application/octet-stream',
},
],
}

headers = {'Content-Type': 'application/json', 'Authorization': f'ApiKey {settings.NOVU_API_KEY}'}
response = requests.post(url=f"{settings.NOVU_API_URL}/v1/events/trigger", headers=headers, json=data)
Is there anything I'm missing? Thanks..
7 replies