| Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
This property specifies the number of days deleted mail is retained before it is permanently deleted.
[Visual Basic,VBScript] Property DaysBeforeGarbageCollection as Long [C++] HRESULT get_DaysBeforeGarbageCollection(long* pVal); HRESULT put_DaysBeforeGarbageCollection(long Val); [IDL] HRESULT [propget] DaysBeforeGarbageCollection([out,retval] long* pVal); HRESULT [propput] DaysBeforeGarbageCollection([in] long Val);
The default value for this property is 0.
Sub Set_Cleanup(ServerName As String, _
DomainName As String, _
recipname As String)
'ServerName is something like "MyServer6"
'DomainName is something like "DC=MYDOMAIN3,DC=microsoft,DC=com"
'recipname is something like "jamessmith"
Dim objUser As IADsUser
Dim objMailbox As CDOEXM.IMailboxStore
Set objUser = GetObject("LDAP://" + ServerName + _
"/CN=" + recipname + _
",CN=users," + DomainName)
Set objMailbox = objUser
If objMailbox.HomeMDB = "" Then
MsgBox "No mailbox found."
Else
objMailbox.GarbageCollectOnlyAfterBackup = True
objMailbox.DaysBeforeGarbageCollection = 7
'commit the changes
objUser.SetInfo
End If
End Sub