10 Replies Latest reply on Jan 26, 2011 4:05 AM by 681786

    Email notifications in FDM

    681786
      Hi,

      I am trying to write a script in FDM to send a email to the users once the load is successful/failure.

      The problem is I am getting error Type mismatch SendEMail and its pointing to the below line.

      EMail = (sEMailServer, sFromAddress, sToAddress, sEMailSubjectOK, sEMailMessageOK)

      Can any one pls help in how to resolve the issue.

      Thanks,

      Edited by: user10720012 on Jan 25, 2011 4:11 PM
        • 1. Re: Email notifications in FDM
          TonyScalese
          The script line that you have put in your message only shows a call to another script. You should consider posting the entire script as well as the error log if you want meaningful assistance.
          1 person found this helpful
          • 2. Re: Email notifications in FDM
            681786
            Hi Tony,

            This code I wrote in AftLoad script


            sEMailServer = "xxxx"
            sFromAddress = "xxxx"
            sToAddress = "xxx"

            sEMailMessageOK = "FDM Success"

            sEMailMessageERR = "FDM Error"


            If Status = "XX" Then
            EMail = (sEMailServer, sFromAddress, sToAddress, sEMailSubjectOK, sEMailMessageOK)
            Else
            EMail = (sEMailServer, sFromAddress, sToAddress, sEMailSubjectERR, sEMailMessageERR)
            End If

            The error is coming as Type Mismatch SendEMail

            Thanks

            Edited by: user10720012 on Jan 25, 2011 1:32 PM

            Edited by: user10720012 on Jan 25, 2011 4:09 PM

            Edited by: user10720012 on Jan 25, 2011 4:10 PM
            • 3. Re: Email notifications in FDM
              WPaffhausen
              Hello,

              The way you 'scripted' your SendMail is not in compliance with VBscripting. I would suggest you review the Accellerator available in the FDM Workbench for Sending Mail to get the appropriate syntax, types and definitions.

              Thank you,
              • 4. Re: Email notifications in FDM
                681786
                Hi,

                I tried to look into Accelerator "Send Email" and its working,

                But I want to have the If condition for successful load or failure load.

                Something like below:
                If Status = "XX" Then
                EMail = (sEMailServer, sFromAddress, sToAddress, sEMailSubjectOK, sEMailMessageOK)
                Else
                EMail = (sEMailServer, sFromAddress, sToAddress, sEMailSubjectERR, sEMailMessageERR)
                End If


                Can you pls guide me how to do that.

                Thanks,

                Edited by: user10720012 on Jan 25, 2011 4:07 PM
                • 5. Re: Email notifications in FDM
                  TonyScalese
                  Is the SendMail script a separate custom script? If so, this will not work. You cannot call a script in this manner.

                  Edited by: TonyScalese on Jan 25, 2011 5:21 PM
                  1 person found this helpful
                  • 6. Re: Email notifications in FDM
                    WPaffhausen
                    Hello,

                    I think you are going about your send mail in the wrong way. Please obtain some VBScripting knowledge.

                    If you 'double click' the accellerator it will paste the appropriate scripting where your cursor is located.
                    You can then modify/wrap certain pieces around your IF/Then/End If statement to achieve the results you need.

                    Thank you,
                    1 person found this helpful
                    • 7. Re: Email notifications in FDM
                      681786
                      Hi,

                      I think you didnot get my question,

                      I used the Send mail script and generated an email as I did mensioned in my earlier post

                      But In that I want to check for a condition like if the load is successful then send a mail with the message the load is successful;

                      Else the load is failed.

                      So how to check that, though with If we can check but how will I get that status.

                      I tried to used the same Istatus as per my previous post, but with successful I am getting successful message, but for failure its not...

                      Is there a way I can get even the load fail message.

                      Thanks for the help,

                      Edited by: user10720012 on Jan 25, 2011 3:59 PM
                      • 8. Re: Email notifications in FDM
                        681786
                        Hi Tony,

                        Initially I thought of using the customized script, but as per WPaffhausen advice I used the accelerator "send mail" and I am able to get on successful load a email, but unsuccessful load I am not getting a mail.

                        Can you pls advice me on what I can check for the status.

                        Thanks,
                        • 9. Re: Email notifications in FDM
                          TonyScalese
                          As I said previously, you should post the entire script. It is far easier to help someone when you have complete information.

                          As an aside, I've noticed that all of the questions you have asked have remained as unanswered. Is this really the case? Also, have you considered taking the time to flag posts as helpful? Those that take the time to try to help you really should be recognized for their efforts.
                          • 10. Re: Email notifications in FDM
                            681786
                            I marked all the post as helpful...

                            I am getting emails for both successful and not successful.

                            Thanks for all your time.