Search The ForumSearch   RegisterRegister  LoginLogin

MailBee Objects

 AfterLogic Forum : MailBee Objects
Subject Topic: ToAddr on SMTP messages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
knight
Newbie
Newbie


Joined: 21 October 2006
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 21 October 2006 at 9:24am | IP Logged Quote knight

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 View knight's Profile Search for other posts by knight
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 21 October 2006 at 9:42am | IP Logged Quote Alex

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 View Alex's Profile Search for other posts by Alex
 
knight
Newbie
Newbie


Joined: 21 October 2006
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 23 October 2006 at 12:27pm | IP Logged Quote knight

Ah ha...
X-Receiver... that's the one.

I'll give it a try, thanks.


Thanks,
Joe
Back to Top View knight's Profile Search for other posts by knight
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide