Generic Interface (API) sending emails with empty envelope from (from=<>)

Moderator: crythias

Post Reply
jmrkvicka
Znuny newbie
Posts: 2
Joined: 02 Feb 2026, 14:37
Znuny Version: 6.5.2
Real Name: Jozef Mrkvicka

Generic Interface (API) sending emails with empty envelope from (from=<>)

Post by jmrkvicka »

Hi everyone,

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)
However, when I send the same response manually as an agent via the Web GUI, it works perfectly, and the Postfix log shows the correct address: from=<my@example.com>.

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"
  }
}
Troubleshooting steps taken so far:
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.
root
Administrator
Posts: 4296
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Generic Interface (API) sending emails with empty envelope from (from=<>)

Post by root »

Hi,

The GenericInterface uses the same methods like the UI. If you really have only configured Core::Email::SendmailNotificationEnvelopeFrom, you should notice the word Notification in the setting name. The setting SendmailEnvelopeFrom is used for all email except notifications if set.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
jmrkvicka
Znuny newbie
Posts: 2
Joined: 02 Feb 2026, 14:37
Znuny Version: 6.5.2
Real Name: Jozef Mrkvicka

Re: Generic Interface (API) sending emails with empty envelope from (from=<>)

Post by jmrkvicka »

Hi,
Thank you for the clarification! You're right, I got the setting names mixed up in my post.

I have actually been testing with SendmailEnvelopeFrom, but unfortunately, it didn't resolve the issue. Even with this set and deployed, API-generated emails still result in from=<> in Postfix, while the UI works perfectly.

Do you have any suggestions on why is system ignoring this setting or failing to pull the sender from the Queue/Article parameters?

Thanks again!
Post Reply