Solved

SMTPException: Failure sending mail

Posted on 2009-03-30
2
2,003 Views
Last Modified: 2013-12-17
Hi

In my asp.net 3.5 web application, I try to send email to multiple persons (almost 100) using for loop.
It works fine when email has no attachment. But, when email contains the large size attachment (300 KB), after sending 25 emails, it gives a smtpexception:"Failure sending mail".

I have tried using different size of attchment files and I noticed that its giving an exception when the email attachment size reached about 7 MB. (total size of the emails sent with attachment).

What should I do to resolve this problem?
0
Comment
Question by:aplusexpert
2 Comments
 
LVL 26

Expert Comment

by:jar3817
Comment Utility
Maybe you're hitting some memory limit for your application. I'm a php guy, so I'm not terribly familiar with asp.net, but I know with php there is a default setting that limits the amount of memory for a script. Maybe you could up this limit to accommodate the size of the email (body + attachment) times the number of recipients.
0
 
LVL 7

Accepted Solution

by:
aplusexpert earned 0 total points
Comment Utility
Hi

We found that this problem occurs due to the limit of the session size for SMTP server in IIS.  The default size for Limit session size to (KB): is 10240 (10 MB). It is the total size for sending emails for one mail session. So when our application sends email in a loop and the total email size exceeds this limit, it stops. So depending on mail size, you would be able to send x number of mails where x = Limit/Mail Size.
 
Suggested Action:

We can increase the session limit for the session to 50 MB or 100 MB.

This can be done as follows:

1. Start IIS (Internet Information Services).
2. Right click on Default SMTP Virtual Server and select Properties.
3. Select Message tab.
4. There is an option Limit session size to (KB). At present that value for this option has been set to 10240.
5. We can set this value to 51200 (50 MB) or 102400 (100 MB) or anything else as per our requirement.

Thanks.
0

Featured Post

Want to promote your upcoming event?

Is your company attending an event or exhibiting at a trade show soon? Are you speaking at a conference? Spread the word by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

This short article will present "How to import ICS Calendar onto Office 365 Calendar". I was searching for free (or not free) tools to convert ICS to CSV without success. The only tools I found & working well were online tools...this was too hard to…
Microsoft has released various new features which are capable of handling various tasks. One of these tasks is ‘Migration from pop3 to Exchange Server’. Pop3 data stores various data along mailboxes like contacts, tasks, etc. So, it becomes the need…
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now