想写个邮件群发的软件 网上的代码都太老了有问题
好长时间没写了 当时用net.mail写过 但一直有问题
哪位高手有现成的打包一个给我呗 
在此谢过了C#邮件群发邮件软件源码

解决方案 »

  1.   


       //实例化SmtpClient
       SmtpClient client = new SmtpClient("smtp.126.com", 25);   //出站方式设置为NetWork
       client.DeliveryMethod = SmtpDeliveryMethod.Network;
                    
       //smtp服务器验证并制定账号密码
        client.Credentials = new NetworkCredential("[email protected]", "123");   MailMessage message = new MailMessage();
       message.Priority = MailPriority.Normal; //设置优先级   message.SubjectEncoding = Encoding.GetEncoding("gb2312");//主题编码
       message.BodyEncoding = Encoding.GetEncoding("gb2312"); //正文编码
       message.IsBodyHtml = true;//邮件正文是否支持HTML   message.From = new MailAddress("[email protected]", "标题", Encoding.GetEncoding("gb2312"));//设置收件方看到的邮件来源为:发送方邮件地址、来源标题、编码                message.To.Add(_sendTo);//接收方                message.Subject = _title; //标题
                    message.Body = _info;
                    client.Send(message);
      

  2.   

    我去年写过,但是代码不在本机,在我的手提,可惜俺的手提去了上海。
    很简单其实,你把需要群发的email address存放在数据库或者是xml==类型中,只要能读取的到就好。
    最后用for循环或者是.net的Theard就ok了。
    sing System;
    using System.Threading;
    public class Example {
        public static void Main() {
            // Queue the task.
            ThreadPool.QueueUserWorkItem(new WaitCallback(ThreadProc));        Console.WriteLine("Main thread does some work, then sleeps.");
            // If you comment out the Sleep, the main thread exits before
            // the thread pool task runs.  The thread pool uses background
            // threads, which do not keep the application running.  (This
            // is a simple example of a race condition.)
            Thread.Sleep(1000);        Console.WriteLine("Main thread exits.");
        }    // This thread procedure performs the task.
        static void ThreadProc(Object stateInfo) {
            // No state object was passed to QueueUserWorkItem, so 
            // stateInfo is null.
            Console.WriteLine("Hello from the thread pool.");
        }
    }
    http://technet.microsoft.com/zh-cn/magazine/system.threading.threadpool(VS.90).aspx
      

  3.   

    不遍历怎么群发?肯定是要循环的,每封邮件之间Thread一段时间就好了,建议2-3秒
    发邮件方法参考:http://www.cnblogs.com/jeoleo/archive/2011/12/09/2254306.html