Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: finding out the size of the mailbox before sending message


Message #1 by "nick charlesworth" <nick@i...> on Thu, 29 Mar 2001 15:16:15
Hi,



I am writing a hotmail type application with asp, cdo and exchange server 

5.5. Each 



users mailbox is set to a maximum of 2MB by exchange server.



To add attachments i use an upload component to copy the file to a folder 

on the server 



with the same name as the users mailbox. This is no problem. The problem 

comes when 



trying to send the message as when the mailbox size is exceeded (i.e. they 

already have 



1.5MB of messages and then try to send a 1MB attachment which gets added 

to their sent 



folder and thus exceeds their mailbox limit).



I need to be able to calculate the size of the maibox and attachment 

before i call the 



'send message' code so if it exceeds the mailbox size the send will not 

occur so no 



error will be encountered.



What is the quickest, easiest method of calculating mailbox size? Do I 

have to loop 



through the folders collection and loop through the message collection of 

each folder 



or is there a quicker way?



Thanks,



Nick

  Return to Index