473,413 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

I am Using .Net 1.1 mailing sending Problem in C#

Hi


I am Sending Thousands of mail at a time but its sends 500 or 600 mails and stops..
So i need a solution so that it does not stop before completing the Task



Please Help me


Cheers
Mahesh
Mar 21 '07 #1
4 1072
sani723
117 100+
u need an Emailer instead of doing it programatically
Mar 21 '07 #2
u need an Emailer instead of doing it programatically
Hi

I am using same but it still its giving problem

Please help me...
Mar 21 '07 #3
sani723
117 100+
then check the docs of ur Emailer, because through emailer u can sent as many as u want.
Mar 21 '07 #4
then check the docs of ur Emailer, because through emailer u can sent as many as u want.
Hi

My code is

Expand|Select|Wrap|Line Numbers
  1. public static void SendMessage(string to, string subject, string message, MailFormat format)
  2.         {
  3.             //string smtpServer = GetConfigValue("SmtpServer");
  4.             //string smtpPort = GetConfigValue("SmtpPort");
  5.             //string smtpUsername = GetConfigValue("SmtpUsername");
  6.             //string smtpPassword = GetConfigValue("SmtpPassword");
  7.  
  8.             MailMessage mailMessage = new MailMessage();
  9.  
  10.             mailMessage.From = GetConfigValue("SystemEmail"); //from;
  11. #if RELEASE
  12.             mailMessage.To = to;
  13. #else
  14.             mailMessage.To = "mjasonrice@hotmail.com";
  15. #endif
  16.             //mailMessage.Cc = cc;
  17.             //mailMessage.Bcc = bcc;
  18.             mailMessage.Subject = subject;
  19.             mailMessage.Body = message;
  20.             mailMessage.BodyEncoding = System.Text.Encoding.Default;
  21.             mailMessage.BodyFormat = format;
  22.             mailMessage.Priority = MailPriority.Normal;
  23.  
  24. //            if (attachments != null)
  25. //                for (int i=0; i<attachments.Length; i++)
  26. //                    mailMessage.Attachments.Add(new MailAttachment(attachments[i], MailEncoding.Base64));
  27. /*
  28.             mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", smtpServer);
  29.             mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", smtpPort);
  30.             mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 2);
  31.             mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1);
  32.             mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", smtpUsername);
  33.             mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtpPassword);
  34. */
  35.             //SmtpMail.SmtpServer = smtpServer;
  36.             SmtpMail.Send(mailMessage);
  37.         }
  38.  
  39.         public static string GetConfigValue(string Key)
  40.         {
  41.             return System.Configuration.ConfigurationSettings.AppSettings[Key];
  42.         }
  43.  
  44.         public static string GetFileText(string FileName)
  45.         {
  46.             string text, path = string.Format("{0}\\{1}", GetConfigValue("EmailTemplates"), FileName);
  47.             using (StreamReader sr = new StreamReader(path)) text = sr.ReadToEnd();
  48.             return text;
  49.         }
  50.  
  51.         public static void SendMessage(bool useHtml, string toEmail, string toName, string subject, string message, string linkUrl, string linkText, DataView data)
  52.         {
  53.             try
  54.             {
  55.                 // build the xml document
  56.                 string path = string.Format("{0}\\Templates\\Message.xml", GetConfigValue("EmailTemplates"));
  57.                 XmlDocument xmlDocument = new XmlDocument();
  58.                 xmlDocument.Load(path);
  59.  
  60.                 xmlDocument.DocumentElement["From"].InnerText = GetConfigValue("SystemEmail");
  61.                 xmlDocument.DocumentElement["To"].InnerText = toName;
  62.                 xmlDocument.DocumentElement["Body"].InnerText = message;
  63.                 xmlDocument.DocumentElement["Link"]["URL"].InnerText = linkUrl;
  64.                 xmlDocument.DocumentElement["Link"]["Text"].InnerText = linkText;
  65.  
  66.  
  67. where should i put Docus to assign not to stop in sending mails
  68.  
  69.  
Mar 21 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Espen | last post by:
Hi, I just took over maintaining an ASP codebase for sending out newsletters by mail, as well as basic subscriber maintenance. Thing is working ok today, with ~200 subscribers, but there are...
2
by: Nigi | last post by:
I've made a mysql database with php front end which, in part, contains mailing lists. I've used a mailto: link to create a new email with their names in the bcc: field. Unfortunatley their is a...
4
by: Andy M | last post by:
ALERT There is a person by the name of Mike Cox who's trying to turn this mailing list into a Big-8 newsgroup. Many of you know that this and most of the other postresql mailing lists are...
1
by: Nick | last post by:
I am working on a website for a client and one of their requirements was to have a mailing list. I decided to XSLT to transform "templates" to HTML so that editing was very easy and less time...
0
by: techwr-l-confirm+22d099e2f3d881b010eaeb38c05837f62 | last post by:
Mailing list subscription confirmation notice for mailing list TECHWR-L We have received a request from python-list@python.org for subscription of your email address, "python-list@python.org",...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.