Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 24th, 2007, 12:25 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gmbalaa
Default Send mail using Multithreading

Hi to all,

I have written a code for sending email with the use of SMTP in VB.NET.

It retreive the mail addresses from the datagrid to send and send a mail to that addresses one by one..

But,I want to be send a mail with use of multithreading at fast.

Any one know about this pls share with me.

Thanks in advance......
 
Old August 24th, 2007, 09:41 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Design:
- Create a class to handle the sending of the mail.
- Create a method on the class that sends the mail to all recipients in the list.

Implementation:
- Collect the addresses from the grid.
- Assign the list of addresses and the details of the mail to send to an instance of the class.
- Use the System.Threading.Thread class to launch a new thread for the send mail method of your class.

This will result in a new thread spawned off that will execute the mail sending in the background.

-Peter
 
Old August 24th, 2007, 11:22 PM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gmbalaa
Default

Hi Peter,

Thanks for your valuable reply...

I will implement this.

Thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
send mail chavakoti BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 September 4th, 2007 05:03 AM
Send E-mail meme2002bh Access ASP 2 September 30th, 2005 12:53 AM
how to send a mail ashokparchuri General .NET 2 March 24th, 2005 07:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.