8 Replies Latest reply on Nov 28, 2009 6:20 PM by DLW-BPEX

    Need alternative for Send Mail script when using Web Publishing

    CarlaS

      Title

      Need alternative for Send Mail script when using Web Publishing

      Post

      Need alternative for Send Mail script when using Web Publishing

       

      We have a Project Initiation Form layout for non-filemaker clients to submit new projects using Web Publishing.  We would like to have a submit button that sends an email to the Project Rep which is defined on the Initiation Form.  But, the Send Mail script is not compatible with Web Publishing.  Anyone have any ideas about how the Project Rep could be notified when a new project is entered?

       

      I'm using FileMaker Pro 10 Advanced and FileMaker Server 10 Advanced.

        • 1. Re: Need alternative for Send Mail script when using Web Publishing
          Sorbsbuster
            

          Never use IWP, so if this isn't a go-er I'll bow out immediately, but what happens if the Server is set up with appropriate e-mail access and one of the fields that a new user would modify is set to have a script trigger that sends an e-mail?  Does it send from the Server?  Okay, as I type that I'm thinking that everything must happen from the Client.

           

          Okay, here's a technique I have used many times: what about if you create a second separate FM database on the Server, called E-Mail Sender Trigger.  Set up (I'm assuming Windows PC here) a Scheduled Task to launch that E-Mail Sender Trigger File, set to launch as regularly as you want to check for new members.  Have a script within that file that:

           

          - runs on Open

          - all it does is run a script inside the Master Database that...

          - checks for any un-emailed new members

          - cycles through the list, e-mails , and marks them as 'done'.

          - Last step in the script is to close itself

           

          Alan.

          • 2. Re: Need alternative for Send Mail script when using Web Publishing
            CarlaS
              

            This sounds like a possible solution but a little over my head.  Can you give me more details on creating the scripts. 

             

            Yes, our FileMaker Server Advanced is running on a Windows PC server.  We have about 25 Filemaker client users (both Mac & PC).  Web publishing will be used non-client users company wide to initiate jobs for the marketing department.  Records in the main table represent an individual marketing job (i.e. brochure, forms book, mailer, etc.).  Then, we have about 18 related tables for tracking various aspects of a job (usually print jobs) through the production schedule, from job initiation to completion.  It tracks milestone due dates, design specs, distribution, costs, licensing information, etc.  We have been using this database since 1998 and just recently upgrated from FileMaker 5 to FileMaker 10.

             

            The Project Initiation Form (PIF) is in a separate, related database with only a couple of layouts.  The idea is to enable employees company wide (non-FileMaker clients) initiate jobs using the PIF. Then, the Project Rep (Filemaker client) will be notified that the job has been initiated.  The Project Rep would then review the PIF and import the data into related fields in the main database.  The import scripts are already created and working.  I just need help with the submit via email piece of this.

             

            Also, does the PIF table need to be a separate file, or could it be part of the main database as a table but only show the PIF layouts on the web?

             

            Any additional info you could give me on building the separate Email Sender Trigger file and scripts you described would be greatly appreciated.

             

            Thanks!

            CarlaS

            • 3. Re: Need alternative for Send Mail script when using Web Publishing
              Sorbsbuster
                

              I use this technique a lot to create the effect of time-scheduled script triggers in Filemaker (we go back a long way to times when no script triggers were available.)

               

              The aim is to make a Filemaker file run one of its scripts on a 'Time Schedule' - say, twice a day.

               

              You can make the Windows Scheduled Task module in Control Panel fire up any file at a scheduled time.

              You can create a simple FM file (no fields, no layouts required) that has only one script in it - 'Trigger Send E-Mail of New Projects'.  Make this the file that the Windows Scheduled Task fires up.

              Set this Trigger File to run the  'Trigger Send E-Mail of New Projects' on opening (in the File-File Options menu in the file)

              Make this script only have two steps in it.  the first is to run an external script.  You point it to the main database, and then select in the main database the  'Send Email' script (see next step) .  The second step is just 'Close File' and set it to close itself.

              Create a script in the master database that is just  'Send An E-mail'  (Make the script do something very simple and obvious while you test it) .  This script will be developed to be actually the sending of the e-mail that you would want the file to send if the user was logged on as an FM client directly.

               

              You can use this technique to easily create any series of tasks that you want any FM file to do at set times.

               

              This would mean that Project Rep would be informed as regularly as the Task is set to run, though I admit not in real time.

               

              I think from your progress described so far you have the  all of the skills to create thsi, no problem.  Everything else you are doinf can just stay the way it is and will work fine.

               

              Sorry if I'm not answering your question in the right detail - I'm not being intentionally evasive, honest.

               

               

              • 4. Re: Need alternative for Send Mail script when using Web Publishing
                CarlaS
                  

                You have not been evasive.  You have been very helpful.  One last question:

                 

                We really would like this to be in real time, so would it be crazy to have this schedule this task for every 5 minutes?

                • 5. Re: Need alternative for Send Mail script when using Web Publishing
                  Sorbsbuster
                    

                  Dunno.  Never tried that often.  Give it a go...?

                   

                  One other thought: people have come up with clever ways to have Filemaker collect e-mails and parse out the data in them and populate a record.  Would it be easier to have the users use a standard e-mail template and send it to the Project Reps with their suggestion / request, and then if they approved it, the Rep used Filemaker to take the contents of the e-mail and  automatically insert the right data in the right fields in the database?

                   

                  Alan.

                  • 6. Re: Need alternative for Send Mail script when using Web Publishing
                    CarlaS
                      

                    This sounds like a good idea.  It could also probably be done using an Excel form.  For now though, I think we'll stick with the web PIF.  I will keep this idea in mine for other solutions.

                     

                    Thanks again.  You have been very helpful.  Problem solved.  Kudos!

                     

                    Carla

                    • 7. Re: Need alternative for Send Mail script when using Web Publishing
                      DLW-BPEX
                        

                      Carla,

                      One other thing to look into:

                      I believe Send Mail does work with FM Server and Web publishing if you have an SMTP connection -- just not with an email client.

                       

                      Regards,

                      David 

                       

                       

                      • 8. Re: Need alternative for Send Mail script when using Web Publishing
                        DLW-BPEX
                          

                        Carla,

                        I believe that, depending upon what your exact needs are, another alternative (although it has been awhile) is to use Open URL in conjunction with "mailto:".

                         

                        David