Sending mails using Thread. [Resolved]

Posted by Sutotpal under Regular Expressions on 2/10/2011 | Points: 10 | Views : 7073 | Status : [Member] | Replies : 7
hi 2 all..

I want to send thousands of email in background using thread.
anyone can provide the code

Best Regards,
Sutotpal



Responses

Posted by: jayanthichebrolupanoramicworldbiz-8895 on: 2/10/2011 [Member] Starter | Points: 50

Up
0
Down

Resolved
Try using this code may be useful for you

Sub CreatingTheThread()

Dim ts As System.Threading.ThreadStart = New
System.Threading.ThreadStart(SendEmail)


Dim t As System.Threading.Thread = New System.Threading.Thread(ts);

t.Start();

End Sub

Sub SendEmail()
Place your e-mail sending code here.
End Sub


Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 2/10/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Sutotpal


Say Your Full Requirement , where you store all sending mail Id's . . Fully Describe Your Question

Best Regard's
Prabhakar

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sutotpal on: 2/10/2011 [Member] Starter | Points: 25

Up
0
Down
hi prabhakar

When i m sending the thousands of email in a simple way , then after some time , it's throw an error that is "Session Time out" .
So i want to use thread to sending emails.

Best Regards,
Sutotpal

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/10/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Thread will be one option... If you use VS 2010 use the parallel programming concept with which u can make the tasks run parallely

Thanks
Karthik
www.f5Debug.net

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.b.rokkam on: 2/10/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
You can also use windows service to the task for you.

Thanks
Madhu

Thanks and Regards
Madhu

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/10/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Just create the code to send email and use thread to achive the same.

like Thread.start()

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sutotpal on: 2/11/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Jayanthi ,

Thanks for this code, It's works...


Best Regards,
Sutotpal

Sutotpal, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response