Skip to content

Commit

Permalink
Merge branch 'main' into send-to
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffersonBledsoe committed Jan 8, 2024
2 parents b919c01 + 293cdd3 commit 53d5538
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def get_reply_to(self):
if field_id:
for data in self.form_data.get("data", ""):
if data.get("field_id", "") == field_id:
return data["value"]
return data.get("value", "")

return self.form_data.get("from", "") or self.block.get("default_from", "")

Expand Down Expand Up @@ -396,7 +396,7 @@ def attach_xml(self, msg):
for field in self.filter_parameters():
SubElement(
xmlRoot, "field", name=field.get("custom_field_id", field["label"])
).text = str(field["value"])
).text = str(field.get("value", ""))

doc = ElementTree(xmlRoot)
doc.write(output, encoding="utf-8", xml_declaration=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from plone.restapi.testing import RelativeSession
from Products.MailHost.interfaces import IMailHost
from six import StringIO
import xml.etree.ElementTree as ET
from zope.component import getUtility

import transaction
import unittest
import base64
import os
import transaction
import unittest
import xml.etree.ElementTree as ET


class TestMailSend(unittest.TestCase):
Expand Down

0 comments on commit 53d5538

Please sign in to comment.