How to detect that the message size has exceeded the limit?

J

Jenny Tam

We have implemented an Outlook COM add-in, and one of the goals is to
send email messages while extracting email properties at the same
time. We have implemented our custom 'Send' button and so far so
good.

However, we have found that when the message size is way too big, we
could get an error message like this when we click the regular 'Send'
button:

"the message being sent exceeds the message size established"

However, when the user clicks our custom 'Send' button (using
IMessage::SubmitMessage()), we only get "Unspecified error".

Now my question is whether we could detect the message size has
actually exceeded the limit. Where can we find the limit?

Any help is much appreciated!!

Thanks in advance,
Jenny
 
J

Jenny Tam

Hi there! I'm so happy that I finally got a response!

Ok. It does not really matter how big the message is. We tested our
custom Send button by doing the followings:

1) Create a word doc that is around 2 MB (actually the size depends on
the limit you have on the Exchange server)
2) In Outlook, create a new email; attach this 2 MB document; set To:
field

If we click the regular 'Send' button, we will get a meaningful
Outlook msg "The message being sent exceeds the message size
established for this user."

But if we click our custom 'Send Export' button, we will get
'Unspecified error' when calling IMessage::SubmitMessage().

What I want to know is whether it is possible to detect that the
message has exceeded the size imposed on the Exchange Server so that
we can display a more meaningful error message.

Thanks in advance!!!
Jenny
 
D

Dmitry Streblechenko \(MVP\)

If you are saying that it happens for any message, not matter what size, I
don't think the size really matters. What is the mailbox size limit? Is the
real mailbox size close to that limit?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
J

Jenny Tam

Thanks for following up. :)

However, I know with Exchange we can limit the size of the Inbox as
well as restrict the size of any incoming/outgoing email attachments.
This issue is about a user who is trying to "Send Export" an email on
which they have an attachment greater than what the Exchange
administrator is allowing them send.

The issue is with the size of the attachment which causes the scripts
to fail as Exchange isn't allowing the email to be sent.

Thanks in advance!
Jenny
 
D

Dmitry Streblechenko \(MVP\)

Ok, I see now. AFAIK you can get that information from the AD. I have never
done that however.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
J

Jenny Tam

Thanks again, Dmitry. Could you please be more elaborate?
What's the AD?

Thanks,
Jenny
 
K

Ken Slovak - [MVP - Outlook]

Not Dmitry, but AD is the Active Directory. You can work with it using LDAP
or ADSI code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top