-7

3000人以上の顧客に同じメールメッセージを送信したいのですが、それを行うための最良の最短の方法は何ですか?、メールアドレスとメール本文のリストを取得するツールはありますか?注:私はメールサーバーを持っています

4

1 に答える 1

2
List<Customer> customerList = GetAllCustomers();

string subject = "Hello World";
string content = GetContent();

// Loop through all customers and send e-mail to each
foreach(Customer customer in customerList)
{
   MailMessage newMail = new MailMessage("you@yourcompany.com", customer.Email, subject, content);

   newMail.IsBodyHtml = true;

   SmtpClient sender = new SmtpClient();

   sender.Send(newMail);
}

You can move the GetContent() within the loop if you have a customer personalised email.

I hope you have their permission to send them e-mails. I share this code with you on the premise that it will not be used to spam people.

于 2012-04-12T10:31:15.030 に答える