peter
peter

Reputation: 13491

How To Detect Email Size Issues In .NET

We have an application which sends out automatic email notifications to our users.

Those emails come from a no reply address for instance '[email protected]'.

The problem comes when the attachments added to the automatic emails go above the limit of the receiver email server, e.g. 8 MB, or 10 MB.

Is there a way in .NET to detect that this is going to happen? If a reply comes to no-reply saying that there is a failure because the limit was exceeded that is not ideal because that address is never checked.

Is there a way of detecting whether this will be a problem before sending the email?

I guess the main problem is that the email size limit can be configured, so we don't know what it is going to be for a particular organisation.

Upvotes: 5

Views: 718

Answers (1)

Fredrik Johansson
Fredrik Johansson

Reputation: 3535

Just a thought, why don't you insert links to the attachments/files instead? I've been though this several times, and yes if the file to attach is personal, attach it, otherwise just put the attachment on a webserver and link to it.

That would certainly speed up mail delivery, and reduce bouncing messages.

Hope this helps!

Upvotes: 5

Related Questions