locked
How to send mail notification after each file has processed? RRS feed

  • Question

  • Hello all,

    i have to send a notification after each file has been processed.

    For example i have two files named "mail_details1" and "mail_details2".After each file is processed a notification has to sent. Total 2 notifications has to be sent .This is working when two files have different names like "mail_details1" and "mail_details2".

    But i have a problem where two files names are same like

    "mail_details1" and "mail_details1". Here im getting only one notification.

    Can anybody help me out please what's happening here.





    Wednesday, November 28, 2012 11:28 PM

Answers

  • Presumably you already have an event handler data flow set up with a send mail task.

    The fact that you have two mails with two files names but only one when you have the same name twice leads me to believe that it is set up to send a mail on the change of a variable value. I can only assume then that you are processing the files using a container loop that gets the file name and path performing the processing of those files accordingly.

    I think you should create an on Post Execute send mail data flow on the executable in the loop that actually does the processing.


    If you're happy and you know it vote and mark.

    • Proposed as answer by Eileen Zhao Tuesday, December 4, 2012 8:19 AM
    • Marked as answer by Eileen Zhao Wednesday, December 5, 2012 7:41 AM
    Thursday, November 29, 2012 4:14 AM

All replies

  • You need to provide more information.

    Are you using ssis?

    your notification is by email?

    how is designed your package?

    how do you know that two files with same name are not the same?

    • Marked as answer by sibi7575 Friday, November 30, 2012 6:14 PM
    • Unmarked as answer by sibi7575 Friday, November 30, 2012 6:15 PM
    Wednesday, November 28, 2012 11:34 PM
  • Presumably you already have an event handler data flow set up with a send mail task.

    The fact that you have two mails with two files names but only one when you have the same name twice leads me to believe that it is set up to send a mail on the change of a variable value. I can only assume then that you are processing the files using a container loop that gets the file name and path performing the processing of those files accordingly.

    I think you should create an on Post Execute send mail data flow on the executable in the loop that actually does the processing.


    If you're happy and you know it vote and mark.

    • Proposed as answer by Eileen Zhao Tuesday, December 4, 2012 8:19 AM
    • Marked as answer by Eileen Zhao Wednesday, December 5, 2012 7:41 AM
    Thursday, November 29, 2012 4:14 AM
  • Hi Fanor,

    Thanks for your quick response.

    yes notification is send by email task.

    I am getting a zip files which i have to unzip the files.

    For this i am using "foreach loop container",inside that im using "file process task" to unzip the files.

    This container is connected to another "foreach loop container" which will process all the unzipped files.

    In this "foreach loop container" im using "dataflow task" and "file system task" which will move the files to archive folder after each file is processed

    and two "send mail tasks" one is for "update" and other is for "insert", that means if record is already present in the destinaton need to update and notificaton has to sent.If not need to be inserted.

    Hope now question is clear.

    Thanks

    • Merged by SSISJoostMVP Wednesday, June 19, 2013 3:50 PM continuing thread
    Friday, November 30, 2012 6:20 PM
  • this belongs to this thread: http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/98a73439-e331-44ed-b167-14e588a799f1


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    Friday, November 30, 2012 7:40 PM