Author |
|
knight Newbie
Joined: 21 October 2006 Location: United Kingdom
Online Status: Offline Posts: 2
|
Posted: 21 October 2006 at 9:24am | IP Logged
|
|
|
I'm trying to read messages in from an SMTP server, look at who the Email was addressed to and then do somthing based on that destination address.
So, we send an email to Jimbo@test.co.uk
wait for the .EML file to appear in the Drop directory of the XP SMTP server then run the following code to process that file.
Set Mailer = CreateObject("MailBee.SMTP")
Mailer.ServerName= "test.co.uk"
Mailer.Connect
Mailer.Message.ImportFromFile = sFileName
At this point, I assumed that: Mailer.ToAddr
would have contained the destination email address (Jimbo@test.co.uk), but it dosn't.
The FromAddr is correct in that it shows where the message originated.
Is there any way I can get this ?
Thanks,
Joe
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 21 October 2006 at 9:42am | IP Logged
|
|
|
Do .EML files contain "To:" field? Do you see "To:" when open these files with MS Outlook Express?
Sometimes, IIS places recipients in X-Receiver headers instead. Thus, you may try to use Mailer.Message.GetHeader("X-receiver") method instead.
BTW, if you do not send messages in your code, there is no need to call .Connect method.
Regards,
Alex
|
Back to Top |
|
|
knight Newbie
Joined: 21 October 2006 Location: United Kingdom
Online Status: Offline Posts: 2
|
Posted: 23 October 2006 at 12:27pm | IP Logged
|
|
|
Ah ha...
X-Receiver... that's the one.
I'll give it a try, thanks.
Thanks,
Joe
|
Back to Top |
|
|