Community discussion forum

Send a mail using Multithreading

  • 2 years ago
    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......









  • 2 years ago

    Hi

    Try this

    'First you have to write a procedure to send email

    Sub sendEmail (emailID as string)

    smtp.server = .....

    mail.to = emailID

    ..........

    ...........

    end sub

    'Calling sendEmail procedure in thread

    Dim t As Thread
    t = New Thread(AddressOf Me.sendEmail("<<Email ID>>)" )
    t.Start()



     

  • 2 years ago
    Hi,

    Thanks for your valuable reply..







Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback