-
-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
Description
/@email-send endpoint prepends a message_intro to the message (see plone/restapi/services/email_send/post.py).
If you send a multiple part message, the prepended message_intro makes your multipart message a simple text message. Thus not being able to send e.g. attachments.
My workaroud at the moment is to comment out line #108 of plone/restapi/services/email_send/post.py.
A better way could be a simple boolean field (e.g. disable_message_intro) that would let disable to prepend the message_intro:
{
"name": "John Doe",
"from": "[email protected]",
"to": "[email protected]",
"subject": "Hello!",
"message": "Just want to say hi.",
"disable_message_intro": true
} if not disable_message_intro:
message = f"{message_intro} \n {message}"Or adding a field message_intro which will be added only if not empty.
Or completely removing the prepending of a message_intro.