Bulk Email sending
protected void Button7_Click(object sender, EventArgs e)
{
foreach (ListItem item in this.ListBox2.Items)
{
if (item.Selected)
{
MailMessage mail = new MailMessage();
mail.To.Add(new MailAddress(item.Text));
mail.From = new MailAddress("email");
mail.Subject = "Happy Ganesh 2014";
mail.Body = TextBox4.Text;
mail.Attachments.Add(new Attachment(FileUpload1.FileContent,
System.IO.Path.GetFileName(FileUpload1.FileName)));
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address
smtp.Credentials = new System.Net.NetworkCredential("email",
"pass");
smtp.EnableSsl = true;
smtp.Send(mail);
}
}
}
I Find it very interesting and supportive. Thanks for sharing such great information. hope you keep sharing such kind of information Email Bulk Software
ReplyDeleteThis code is really important thanks for sharing this.
ReplyDeletemass mailer software is one which you need when you send bulk emails.
Good content and nice blog. Thanks for sharing
ReplyDeletesuch great information. hope you keep sharing such
kind of information Advance Bulk Mailer
ReplyDeleteThanks for sharing this blog ! such a great blog !
Bulk Email Software