将LDAP帐户添加到MS Outlook ProgramMaticali
我将RDO库用于Outlook 我添加了POP3帐户,没有问题将LDAP帐户添加到MS Outlook ProgramMaticali,outlook,ldap,outlook-redemption,Outlook,Ldap,Outlook Redemption,我将RDO库用于Outlook 我添加了POP3帐户,没有问题 RDOSession Session = new RDOSession(); Session.Logon(); var AllAccounts = Session.Accounts; bool AccFound = false; foreach (RDOAccount acc in AllAccounts) { i
RDOSession Session = new RDOSession();
Session.Logon();
var AllAccounts = Session.Accounts;
bool AccFound = false;
foreach (RDOAccount acc in AllAccounts)
{
if (acc.Name.Equals("testacc@mail.loc", StringComparison.OrdinalIgnoreCase))
AccFound = true;
}
if (!AccFound)
{
try
{
var POP3Account = AllAccounts.AddPOP3Account("Test Account", "testacc@mail.loc", "pop3.mail.loc", "smtp.mail.loc", "testacc@mail.loc", "Password");
POP3Account.SMTP_UseAuth = true;
POP3Account.Save();
}
catch
{ }
}
Session.Logoff();
都很好
但我不明白如何将LDAP通讯簿帐户添加到Outlook配置中
有可能吗?
你能给我简单的样品C吗
谢谢你的帮助
更新
也许对某人有帮助
Dim Profiles = CreateObject("ProfMan.Profiles")
Dim MyProfile = Profiles.Item("Outlook")
Dim LDAPService = NewProfile.Services.Add("EMABLT", "Personal Folders", False)
Dim Properties = CreateObject("ProfMan.PropertyBag")
Properties.Add(PR_DISPLAY_NAME,"Name LDAP Address Book")
Properties.Add(PR_LOCAL_HOST_NAME,"LDAP server")
PropertiesLDAP.Add(&H66230003, "0") 'Enable custom search base
Properties.Add(PR_PROFILE_USER,"dc=comp,dc=loc") 'Search base
Properties.Add(&H6615000B, "true") 'Enable SPA
Properties.Add(&H6601001E, "3268") 'Port
LDAPService.Configure(0, , Properties)
目前,只能添加POP3/SMTP、PST和代理Exchange帐户。 您应该能够使用该库,但它的级别较低-您有责任设置LDAP提供商期望的所有属性:您可能希望使用click iProAdmin或ImapSession | AdminServices查看现有LDAP帐户 更新:从5.23版开始,赎回将支持添加LDAP帐户。在5.23发布之前,请联系dimastr.com的redemption获取测试版
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set LdapAccount = Session.Accounts.AddLDAPAccount("Test LDAP Account", _
"www.zflexldap.com", 389, _
"cn=ro_admin,ou=sysadmins,dc=zflexsoftware,dc=com", _
"zflexpass")
欢迎来到堆栈溢出!寻求调试帮助的问题此代码为什么不起作用?必须包括所需的行为、特定的问题或错误以及在问题本身中重现这些问题所需的最短代码。没有明确问题陈述的问题对其他读者没有用处。请参阅:。如果您想要一个支持RDOSession.Accounts.AddLDAPAccount的试用版,请向dimastr.com上的redemption发送电子邮件。您的ProfMan代码可以工作,但AddLDAPAccount也支持密码。