Hi,
I'm developing a mailing system that generates messages, then places them in a queue on the server.
When the message is received, the header looks as follows:
Return-Path: <demo2@mydomain.net>
Received: from [1.81.105.44] (HELO java.mydomain.dev)
by mydomain.net (CommuniGate Pro SMTP 4.0.6)
with ESMTP id 303285 for demo2@mydomain.net; Wed, 05 Nov 2003 12:37:51 +0100
Message-ID: <5377432.1068032151145.JavaMail.root@java.mydomain.dev>
Date: Wed, 5 Nov 2003 12:35:51 +0100 (CET)
From: demo2@my domain.net
To: demo2@mydomain.net
Subject: jellyfish
Mime-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_40_636362.1068032151139"
At the moment the message is sent out from my application (ie. before it is placed in the queue) the header looks like this:
Message-ID: <5377432.1068032151145.JavaMail.root@java.mydomain.dev>
Date: Wed, 5 Nov 2003 12:35:51 +0100 (CET)
From: demo2@my domain.net
To: demo2@mydomain.net
Subject: jellyfish
Mime-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_40_636362.1068032151139"
What I want to do is to recover the ESMPT id (in this case ESMTP id 303285), before the message is actually sent so that I can save this information to my database. I've been looking at the API for TransportListener trying to figure a way to do this but can't come up with anything. Does anyone have any ideas about how I might accomplish my task? Has anyone tried anything similar?
I'd be most grateful for any ideas.
Damian