如何在asp.net中发送电子邮件列表 [英] how to send list of emails in asp.net

查看:84
本文介绍了如何在asp.net中发送电子邮件列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有电子邮件均保存在记事本中.

在我的应用程序中,我使用上传"按钮上传记事本文件以提交到邮件中,然后通过上传文本文件"传递给所有联系人.

请帮忙.

All emails are saved in notepad.

In my application I use an ''Upload'' button to upload the notepad file for submission to the mail, to be delivered to all the contacts in an Upload Text File.

Please help.

推荐答案

使用流阅读器从文本文件中读取行(电子邮件).
Use stream reader to read the line(email) from the text file.
//sample
StreamReader sr = new StreamReader("C:\\test.txt");//path
string emailID
while (emailID != null)
            {
                //code to send email (emailID)
              
              next line(email)//
                emailID = sr.ReadLine();
            }
sr.Close();


这篇关于如何在asp.net中发送电子邮件列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆