Re: SMTPReceiveAgent + EWS
- From: Reinhard <Reinhard@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Jun 2008 10:22:01 -0700
HI Glen !
I managed to add the X-Header to the messages and send it to different
mailboxes according to some criteria.Now I'm facing the problem that I cannot
find any method for reading out the X-Header with EWS in order to call
UpdateItem /SendItem/MoveItem
How can this be done with EWS
Thanks in advance,
"Reinhard" wrote:
I found the error, now it works...
But I also got an Security Exception, I changed the logon information for
the transport service to local system account and now it works. But I'm not
happy with changing the default logon information in order to use the
new-mailbox command via C#, I'm looking for a better solution ...
"Reinhard" wrote:
Your are completely right, was too late yesterday night I guess. I just try
to generate a new mail user with the new-mailbox command but it doesn't
create a new user although I don't get any errors .
My code looks like this :
..
..
..
pipeline = myRunSpace.CreatePipeline();
myCommand = new Command("New-Mailbox");
myCommand.Parameters.Add("Name", USER);
myCommand.Parameters.Add("Database", "Mailbox Database");
myCommand.Parameters.Add("Password", ss);
myCommand.Parameters.Add("UserPrincipalName",
mailagent@xxxxxxxxxxx);
myCommand.Parameters.Add("OrganizationalUnit",
"contoso.com/Users");
myCommand.Parameters.Add("DisplayName", "Mailagent");
myCommand.Parameters.Add("SamAccountName", USER);
pipeline.Commands.Add(myCommand);
pipeline.Invoke();
Eventlog.Add_Log_Entry("Added Successfully User");
myRunSpace.Close();
The password is generated like this
System.Security.SecureString ss = new System.Security.SecureString();
ss.AppendChar('h');
....
...
...
...
Do you know what's wrong with this command ?
Thx
"Glen Scales [MVP]" wrote:
If there are multiple recipients you can just can just modify the envelope
recipients so just a particular user that you don't want to receive the
message doesn't receive it.
Cheers
Glen
"Reinhard" <Reinhard@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:77AAB059-3722-403B-81BD-CB2C32A10BCC@xxxxxxxxxxxxxxxx
Well, I also had the idea of doing it like this. but what happens when
there
are more recipients and lets say the sender is already included in two
recipients outlook contacts ? Then I have to send the message immediately
to
both recipients. For the other recipients on the message I have to save it
in
the "deferred delivery mailbox" till the sender verifies himself .
In case there is just one recipient then the rewriting of the recipient
would work for sure.
The only option I see right now is to use the server side rules for the
unverified messages like this: In the myEndofDataHandler I add a X-Header
with the names of the recipients which don't have the sender in the
contact
list. But I guess the messages are stored first in the mailbox of the user
and then moved to the "deferred delivery mailbox " , is it right ?
Thank you for you help
"Glen Scales [MVP]" wrote:
You could rewrite the envelope recipients so the message is delivered to
another mailbox eg call it something like "deferred delivery mailbox"
(make
sure you store the original recipients in another x-header) then when the
user verifies themselves you just need to write a process that resubmits
the
messages in the "deferred delivery mailbox" from that user back to the
original recipients.
Cheers
Glen
"Reinhard" <Reinhard@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B35E9DA1-3D10-489A-AC30-FDDFCB15CE83@xxxxxxxxxxxxxxxx
Hi Glen!
Thx for your help. Your recommendation for doing the job sounds great,
I
have to check it out ! But is it possible to hold certain messages on
the
server and deliver the mails after let's say 3 days [ e.g the sender
has 3
days left to verify himself via ASP + IIS ] either to the inbox folder
or
the
junk folder ?
Thank you
"Glen Scales [MVP]" wrote:
What you can do is add an x-header to the messages that you want moved
using
a Transport agent and then use a rule on the users mailboxes that you
want
the message moved. You can use Server side rules to move a message
based
on
a specific X-header. There are a few methods to create server side
rules
the
Outlook 2007 OOM now supports creating rules see
http://msdn.microsoft.com/en-us/library/bb206765.aspx you can also use
CDO
1.2 and the old Rule.dll.
Cheers
Glen
"Reinhard Wagner" <reinhard_wagner@xxxxxx> wrote in message
news:%23iX7zgjwIHA.420@xxxxxxxxxxxxxxxxxxxxxxx
Hello.
I'd like to move arriving messages(which I intercept with
SmtpReceiveAgent) to a differnt folder than the default one. My
problem
is
that I don't know how this should be done. I'd like to use EWS to
move
messages which aren't included in the users Outlook contact list to
the
junk folder. How can I tell the mailserver that the messages
shouldn't
be
stored in the for example inbox folder of the user ? Is it possible
?
Thanks for your help in advance
Rhino Wagner
- Follow-Ups:
- Re: SMTPReceiveAgent + EWS
- From: Glen Scales [MVP]
- Re: SMTPReceiveAgent + EWS
- References:
- Re: SMTPReceiveAgent + EWS
- From: Glen Scales [MVP]
- Re: SMTPReceiveAgent + EWS
- From: Reinhard
- Re: SMTPReceiveAgent + EWS
- From: Glen Scales [MVP]
- Re: SMTPReceiveAgent + EWS
- From: Reinhard
- Re: SMTPReceiveAgent + EWS
- From: Reinhard
- Re: SMTPReceiveAgent + EWS
- Prev by Date: Re: Need API Details For Getting Public Folder Properties
- Next by Date: Re: SMTPReceiveAgent + EWS
- Previous by thread: Re: SMTPReceiveAgent + EWS
- Next by thread: Re: SMTPReceiveAgent + EWS
- Index(es):
Relevant Pages
|