Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newsletter

Status
Not open for further replies.

transparent

Programmer
Sep 15, 2001
333
GB
I am writing a Newsletter class that will send bulk emails from my website to subscribed members.

In my opinion, this should run in its own thread.

Should I place the thread code within the newsletter class, or place this around the call to the class?
 
i.e.
public class Newsletter: IDispatch
{
private IEmailSender _sender;

public Newsletter(IEmailSender _sender)
{
this._sender = _sender;

}

public void Dispatch(string from, string[] targets, string subject, string message)
{
//Thread code here???
foreach(String target in targets)
{
_sender.Send(from,target,subject,message);
}

}
}


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top