I'm struggling with sending email responses via HTTP request. When I create an Article via an HTTP request, everything looks correct in the GUI (the article is visible and marked as an outgoing email), but the actual email is never delivered.
After checking the Postfix logs, I discovered that the email is being sent with a null sender (empty envelope from):
Code: Select all
Jan 29 11:25:03 otrs postfix/qmgr[1418]: D074A22000A: from=<>, size=9043, nrcpt=1 (queue active)My HTTP Request:
Code: Select all
{
"UserLogin": "myacc",
"Password": "password123",
"Ticket": {
"Title": "API Test",
"QueueID": 6
},
"Article": {
"CommunicationChannel": "Email",
"ArticleType": "email-external",
"SenderType": "agent",
"IsVisibleForCustomer": 1,
"Subject": "Technical Support",
"To": "customer@example.com",
"From": "support@example.com",
"Body": "Hello,\n\nThis is a test response...\n\nBest regards,\nIT Team",
"MimeType": "text/plain",
"Charset": "utf-8"
}
}Communication Log: The detail shows: Sending email from '' to 'customer@example.com'. For some reason, Znuny is ignoring the From field in the JSON request or failing to map it.
SysConfig - SendmailEnvelopeFrom: I've configured a global address in Core::Email::SendmailNotificationEnvelopeFrom and performed a Deployment. Despite this, logs still show from='"'.
Queue Configuration: QueueID 6 is correctly associated with the System Address that matches the From field in my request.
My Questions: Why does the Generic Interface (TicketUpdate/TicketCreate) fail to use the address defined in Article -> From or the address associated with the Queue, while the GUI handles it correctly? Am I missing a mandatory parameter in the JSON (e.g., a trigger for ArticleSend), or is there a specific mapping required in the Web Service configuration to ensure the Envelope-From is correctly populated?
Any insights or suggestions would be greatly appreciated.
Thank you.