Closed florentjb closed 3 months ago
Are you looking for the api:mail hook? The hooks you mentioned are for SMTP.
thanks, but this hook return only :
{"from":"xxxt","to":["xxx"], "id":"18e7a638e4c000f68b", "interface":"api", "origin":false, "transtype":"HTTP", "time":1711450328652, "user":false}
Ah I see, sorry didn't know that. What's your usecase for checking headers when a message is submitted through the api? Surely you control the application doing it?
it is very common to put additional tags in emails, for more detailed statistical purposes
I see, so like for statistics you're counting in a zonemta plugin? Doesn't seem possible right now when submitting through the api. If I were you, I'd either do the statistics counting in my (php) app or use smtp to submit it to zonemta.
I will follow your advice to switch to SMTP ! thanks ;) Maybe a futur feature ? ;)
Hello,
I use Zone-mta with API /send So, i need to use and get a personalized Tags like X-Tags: Toto From php and curl , I use this :
$url = 'http://localhost:12080/send'; $payload = json_encode([ "from" => $emailData['from'], "to" => $emailData['to'], "subject" => $emailData['subject'], "text" => $emailData['text'], "html" => $emailData['html'], "headers"=>'[{"X-Tags" : "Toto" }]' "attachments" => $emailData['attachments'] ]);
But, impossible to get this headers with Hook ( 'message:headers', 'message:store' ...)
Don t understand how get this Tags
Did I miss something? Thanks à lot !