Background bulk mail RRS feed

  • Question

  • Hi,

    I want to create multiple records and email them .

    The mail sending should be non-blocking. I should get signal at the end of completion all send.

    So there can be multiple back ground tasks.

    I should prevent close of application, till all tasks done.



    Please remember to mark the replies as answers if they help and unmark them if they provide no help , or you may vote-up a helpful post

    • Moved by Stanly Fan Wednesday, April 11, 2018 6:40 AM
    Tuesday, April 3, 2018 7:46 AM

All replies

  • Hi,

    What the type of your project is?

    In fact, I can not clear understand your purpose, did you have any problem in your project? Please provide more details and code.

    Note: I noticed your asked a question here, have you solved it now? If so, please close the thread by marking the reply as answer, if not, please let me know.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 4, 2018 1:38 AM
  • Hello,

    Going with what you wrote, I would suggest looking at using SMTP asynchronous along with subscribing to  SendCompleted event, see the following example which does one email yet by using a for/next or foreach you have a pattern to go with. In SendCompleted you can log successes and failures. I have an example on how to work through testing sending emails 

    In regards to preventing the app from closing, users can always find ways around anything you do to prevent this. Consider a Windows Service instead.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, April 4, 2018 9:41 AM