|
Version: 7C
HC7 Build: 7.00.0012 and later
API Build: 1.00.0001 and later
Exchange Manager - SetExchangeMailboxGeneralProperties updates a specified exchange mailbox. This web service call can be made as http://your-domain.com/HC7API/ExchangeManager.asmx?op=SetExchangeMailboxGeneralProperties.
Input Parameters
HostUserName
HostPassword
OwnerName
MailboxName - name of mailbox to be updated
MailDomainName - name of mail domain under which mailbox was created
OptionalParam
FirstName
Initials
LastName
DisplayName
OfficeLocation
StreetAddress
City
Country
State
ZipCode
JobTitle
Company
Department
BusinessPhone
Fax
HomePhone
MobilePhone
HomePage
Notes
Language
Output Parameters
N/A
Sample Optional Parameters
<Parameters>
<Parameter Name = "FirstName">john</Parameter>
<Parameter Name = "Initials">Mr.</Parameter>
<Parameter Name = "LastName">Smith</Parameter>
<Parameter Name = "DisplayName">john</Parameter>
<Parameter Name = "OfficeLocation">USA</Parameter>
<Parameter Name = "StreetAddress">st # 12</Parameter>
<Parameter Name = "City">Athens</Parameter>
<Parameter Name = "Country">USA</Parameter>
<Parameter Name = "State">Texas</Parameter>
<Parameter Name = "ZipCode">30601</Parameter>
<Parameter Name = "JobTitle">Business Analyst</Parameter>
<Parameter Name = "Company">Telecom</Parameter>
<Parameter Name = "Department">Marketing</Parameter>
<Parameter Name = "BusinessPhone">(903) 675-6482</Parameter>
<Parameter Name = "Fax">(903) 675-6484</Parameter>
<Parameter Name = "HomePhone">(903) 670-6482</Parameter>
<Parameter Name = "Notes">exchange mailbox general properties</Parameter>
<Parameter Name = "Language">French</Parameter>
</Parameters>
Sample SOAP Request
POST /HC7API/ExchangeManager.asmx HTTP/1.1
Host: your-domain.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/SetExchangeMailboxGeneralProperties"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SetExchangeMailboxGeneralProperties xmlns="http://tempuri.org/">
<HostUserName>host</HostUserName>
<HostPassword>host123</HostPassword>
<OwnerName>david</OwnerName>
<MailboxName>mymailbox</MailboxName>
<MailDomainName>MyMailDomain.com</MailDomainName>
<OptionalParam>xml</OptionalParam>
</SetExchangeMailboxGeneralProperties>
</soap:Body>
</soap:Envelope>
Sample HTTP Request
POST /HC7API/ExchangeManager.asmx/SetExchangeMailboxGeneralProperties HTTP/1.1
Host: your-domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
HostUserName=host&HostPassword=host123&OwnerName=david&MailboxName=mymailbox&
MailDomainName=HC7API.com&OptionalParam=xml
Sample C# Code
public ExchangeManager.Response SetExchangeMailboxGeneralProperties(string strHostUserName, string strHostPassword, string strOwnerName, string strMailboxName, string strMailDomainName)
{
try
{
ExchangeManager.ExchangeManager oExchange = new ExchangeManager.ExchangeManager();
ExchangeManager.Response oResponse = new ExchangeManager.Response();
XmlDocument oDoc = new XmlDocument();
//Adding root node
XmlNode xOptionalParam = oDoc.CreateNode(XmlNodeType.Element,"Parameters","");
//Adding sub nodes
XmlNode xParameter = oDoc.CreateNode(XmlNodeType.Element,"Parameter","");
XmlAttribute xAttribute = oDoc.CreateAttribute("Name");
xAttribute.Value = "ForwardAddress";
xParameter.Attributes.Append(xAttribute);
xParameter.InnerText = "john@MyMailDomain.com";
xOptionalParam.AppendChild(xParameter);
.......
.......
.......
oResponse = oExchange.SetExchangeMailboxGeneralProperties(strHostUserName, strHostPassword, strOwnerName, strMailboxName, strMailDomainName, OptionalParam);
}
catch
{
}
return oResponse;
}
Sample Response
<Response>
<Method>SetExchangeMailboxGeneralProperties</ Method>
<Status>true</Status>
<ErrorCode>72300061</ErrorCode>
<ErrorDescription>User updated successfully.</ErrorDescription>
<Result/>
</Response>