'Bypass/Ignore Exchange Server "Maximum Send Size"?

As soon as possible I will start a bounty and award 150 (that's what I have) points for solution.

I am developing Outlook add in. When message is sent, add in processes the message, it removes the attachments and sends them through different transfer channel and puts the attachment download links in message body.

When using outlook with exchange server with "maximum send size" limit users can't even attach large files to message. Outlook displays a warning that imposes exchange limit.

To make it worse attachment is refused before any of attachment events are fired.

I need a way to bypass this behavior. Something that will allow users to add attachments of any size by using outlook paper clip button, or drag and drop. Or good direction I can work on.

Adding separate attach button is not an option.



Solution 1:[1]

You cannot do this, by design. The limit is enforced in the message store to which the submit operation is sent. You could zip the attachment, or chunk it up into separate emails, to allow very large data to be sent.

Solution 2:[2]

Try to set the PR_MAX_SUBMIT_MESSAGE_SIZE MAPI property (DASL name http://schemas.microsoft.com/mapi/proptag/0x666D0003) using Store.PropertyAccessor.SetProperty.

I was able to set it using OutlookSpy (I am its author) - click IMsgStore button, right click, select IMAPIProp::GetProps, type PR_MAX_SUBMIT_MESSAGE_SIZE - the property is not shown by default, then double click to modify it. I don't know if Outlook will overwrite it on the local cached store later - I never tried to set that property.

Note hat the limit is there for a reason - Exchange won't let you send the message if it is over the limit. But it will work if you simply want to get rid of the warming because you will handle the attachment on your own when the message is sent.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Steve Townsend
Solution 2