Ok, as your threads are duplicate I'll answer you here and remove the other post in your old thread:
I only know of the following EVENTS that trigger upon incoming emails or interaction with the MAIL_INBOX:
Lua Code:
EVENT_MAIL_INBOX_UPDATE
EVENT_MAIL_READABLE
EVENT_MAIL_TAKE_ATTACHED_ITEM_SUCCESS
EVENT_MAIL_TAKE_ATTACHED_MONEY_SUCCESS
EVENT_MAIL_REMOVED
EVENT_MAIL_NUM_UNREAD_CHANGED
You could use EVENT_MAIL_READBALE e.g. and register a new callback function and check the incoming COD amount by help of the mail id.
Or you Pre-hook this function here to above to get the COD amount:
Lua Code:
function ZO_MailInboxShared_PopulateMailData(dataTable, mailId)
local senderDisplayName, senderCharacterName, subject, icon, unread, fromSystem, fromCS, returned, numAttachments, attachedMoney, codAmount, expiresInDays, secsSinceReceived = GetMailItemInfo(mailId)
dataTable.mailId = mailId
dataTable.subject = subject
dataTable.returned = returned
dataTable.senderDisplayName = senderDisplayName
dataTable.senderCharacterName = senderCharacterName
dataTable.expiresInDays = expiresInDays
dataTable.unread = unread
dataTable.numAttachments = numAttachments
dataTable.attachedMoney = attachedMoney
dataTable.codAmount = codAmount
dataTable.secsSinceReceived = secsSinceReceived
dataTable.fromSystem = fromSystem
dataTable.fromCS = fromCS
dataTable.priority = fromCS and 1 or 2
dataTable.GetFormattedSubject = GetFormattedSubject
dataTable.GetExpiresText = GetExpiresText
dataTable.GetReceivedText = GetReceivedText
end
If it is 0 the other one did not accept it, I guesss.
I'm not sure if the MailID is the same as the send one but would make sense I guess.