1 2 Previous Next 29 Replies Latest reply on Nov 3, 2009 10:50 AM by TSGal

    Email Module

    antno43

      Title

      Email Module

      Post

      Has anyone tried to use the latest BPS - Business Solutions sample modules?

      I have been able to recreate all five modules with modest success for our association. However, I am having major difficulty in getting the EMAIL module to work correctly.

       

      Firstly it should be noted that I have tried this with both MS Outlook 2008 and MS Outlook Express 2000, neither of which has been successful, with multiple emails.

       

      The following doesn't seem to want to pay attention for me:

       

      Multiple emails

      1. although I have created a group of email recipients and have selected that group which appears under the recipients tab, only one email address (from that group) appears in the To: field when pressing send
      2. i have checked and rechecked the script provided and am unable to get a positive outcome

      Should anyone be able to assist I would be glad to show them the script to get it working. It is too big to publish on this forum.

       

      Thank you

        • 1. Re: Email Module
          TSGal

          antno43:

           

          Thank you for your post.

           

          I downloaded the Business Solutions and looking at the EMAIL module.  Looking at the "Send Campaign", it looks like individual emails are being sent to each person.  You'll see this at the bottom of the script inside the Loop.

           

          When you try to send email to the first person, what occurs?

           

          Did you want to send out one email and have everyone's name to appear in the "To" section?  If so, then you'll still need a loop, but inside the loop, keep adding names to a variable before sending.  Make sure you separate each email address with the separator that is needed for MS Outlook (comma? semi-colon?).

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Email Module
            antno43
              

            Hi! and thank you for your reply,

            I have included my Send Campaign Loop below, however I am also a novice and have very little experience with Scripting so I am unable to get my head around your instruction.

            It would be appreciated if you could please view this script and advise what is missing in order to have multiple recipients recieve the same email.

            Currently after including multiple recipients in the recipient listing and selecting the template, when pressing send only one recipient shows in the To: field and the subject does not appear until AFTER the email has been sent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     o:  

             

            Loop

            Set Field [Campaigns::Temp Contact ID Global; LeftWords(Campaigns::Temp Contact List Global;1)]

            Set Field [Campaigns::Temp Contact List Global; Substitute(Campaigns::Temp Contact List Global; LeftWords(Campaigns:: Contact List Global; 1) &"¶"; "")

            Send Mail [To: Campaigns_Contact Management Global ID::email; Subject: Campaigns::Template Subject; Message; Campaigns::Temp Body Global  & Case ( IsEmpty ( Campaigns::Attachment ); "" ;  "¶¶"  & GetAsText ( Campaigns::Attachment )

            Exit Loop If [Campaigns::Temp Contact List Global = ""]

            End Loop

            • 3. Re: Email Module
              TSGal

              antno43:

               

              You'll need to create a global text field in the Contact table, and let's call it "ListOfNames".

               

              I don't know what Outlook uses for separating email addresses, but for this example, let's use a semi-colon.  You can change it to whatever you want.

               

              The instructions you gave me can probably be replaced with:

               

              Select Layout [ <layout name that contains your contacts> ]

              Set Field [Contact::ListOfNames; ""] 

              Loop

                 Set Field [ Contact::ListOfNames; Contact::ListOfNames & Contact::Email & ";" ]

                 Go to Record/Request/Page [ Next; Exit after last ]

              End Loop

              Send Mail [To: Contact::ListOfNames; .... <everything else the same> ... ]

               

               

              That is, it selects the table that has uses the Contact table, and sets the global field to nil to begin.  Then as we go through each record in the loop, we add an Email and separator.  When finished with the loop, we then perform the Send Mail step.

               

              Does that make sense?

               

              TSGal

              FileMaker, Inc.

              • 4. Re: Email Module
                antno43
                  

                Ok!

                Let's see if I have this right...

                 

                Select Layout [ <layout name that contains your contacts> ]

                Set Field [Contact::ListOfNames; ""] 

                Loop

                   Set Field [ Contact::ListOfNames; Contact::ListOfNames & Contact::Email & ";" ]

                   Go to Record/Request/Page [ Next; Exit after last ]

                End Loop 

                Send Mail [To: Contact::ListOfNames; Subject: Campaigns::Template Subject; Message; Campaigns::Temp Body Global  & Case ( IsEmpty ( Campaigns::Attachment ); "" ;  "¶¶"  & GetAsText ( Campaigns::Attachment )

                Exit Loop If [Campaigns::Temp Contact List Global = ""]

                End Loop

                • 5. Re: Email Module
                  antno43
                    

                  Getting a script error on the following:

                   

                  Exit Loop If [Campaigns::Temp Contact List Global = ""]

                   

                  Does this mean it is not required or should it read something different now?

                   

                  • 6. Re: Email Module
                    TSGal

                    antno43:

                     

                    You can remove the last two lines.  We already have the End Loop command a few lines above.

                     

                    TSGal

                    FileMaker, Inc. 

                    • 7. Re: Email Module
                      antno43
                        

                      Still having trouble with the script.

                       

                      Currently have two receipients on the list,the following happens when I press send:

                      To: only ONE recipient appears

                      Subject: NOT SHOWING

                      Body Salutation:  FULL NAME, FIRST or LAST name selection - NOT SHOWING

                      Body Content: Showing

                      Attachment: OK

                       

                      Is there anyway that I can forward screen dump of the script to save typing it all out for you to look at please?

                       

                       

                       

                       

                      • 8. Re: Email Module
                        TSGal

                        antno43:

                         

                        Sorry for the late reply.  I was on holiday from mid-December until now.

                         

                        In your Send Script step, can you make sure you have values for each of the criteria specified?  If the Subject is not showing, then I assume you don't have the Subject initialized.  In the "To:" section, can you verify you are using the variable and not a field name?  Let me know what values are appearing in each of the criteria.

                         

                        TSGal

                        FileMaker, Inc. 

                        • 9. Re: Email Module
                          antno43
                            

                           

                          Thought you must have been on leave.

                          Hope it was relaxing for you.

                           

                          Have listed the Script below as requested.

                           

                          Please note that even when I select Create: Multiple emails (one for each record in found set)

                          I still only get one recipient from the pre-selected recipient listing appear in the To: field in Outlook Express

                           

                          Script reads as follows:

                          Send Mail[Contacts::ListOfNames; Subject: Campaigns:: Template Subject; Message: Campaigns:: Campaigns::Temp Body Global  & Case ( IsEmpty ( Campaigns::Attachment ); "" ;  "¶¶"  & GetAsText ( Campaigns::Attachment ))

                           

                          Regards

                           

                           

                           

                          • 10. Re: Email Module
                            TSGal

                            antno43:

                             

                            Thanks for the information.

                             

                            Yes, if you select Create: Multiple emails (one for each record in found set), you will get one recipient in the To: field for each of the emails.

                             

                            If you look at the contents of "Contacts::ListOfNames", are there multiple email addresses?  If so, and if only one is appearing in the single email, is it the first listing or the last listing?  Also, what is the separator used to separate the email addresses in "Contacts::ListOfNames"?  Is this the correct separator that Outlook Express requires?  When you send an email manually to two different email addresses, is it the same separator?

                             

                            TSGal

                            FileMaker, Inc. 

                            • 11. Re: Email Module
                              antno43
                                 Hi, 

                               

                              Not sure I understand your last post.

                               

                              The Contacts:: ListOfNames was set up as a global field only as you previously instructed

                               

                              The Contact Pickers (Email Contact Picker and Email Group Picker Layouts) are used to select the recipients both of which contain tables of names and email addresses.

                               

                              When sending a campaign email, after selecting two recipients, the only email address shown in the To: field of both Outlook and Outlook Express is the LAST name on the recipients list which is also the LAST name in the Contact Picker Layout table) 

                               

                              Script reads

                              Loop
                                 Set Field [ Contact::ListOfNames; Contact::ListOfNames & Contact::email & ";" ]
                                 Go to Record/Request/Page [ Next; Exit after last ]
                              End Loop 

                              Send Mail [To: Contact::ListOfNames; Subject: Campaigns::Template Subject; Message: Campaigns::Temp Body Global  & Case ( IsEmpty ( Campaigns::Attachment ); "" ;  "¶¶"  & GetAsText ( Campaigns::Attachment ))]

                               

                               

                              I believe that the semi colon in the script above (in bold) indicates the separator being used to separate email addresses, would this be correct? If so, this is the correct separator required for Outlook, so I would expect it to work.

                               

                              I have changed to Outlook 2007 for my email program and I am still only getting:

                              1. one email address in the Outlook To: field (no separator appears after the name)
                              2. no name in the body of the email (<firstname> <lastname> and <fullname> have been preset in the body of the campaign template
                              3. no attachment (attachment selected prior to selecting SEND)
                              4. no subject in the Outlook Subject field

                              Would like to send screen shots of the Script and the Email module could you please advise how I go about doing that? I really need to get to the bottom of this issue ASAP.

                               

                              I have also re-read an explanation in a previous instruction that you posted:

                              That is, it selects the table that uses the Contact table, and sets the global field to nil to begin.  Then as we go through each record in the loop, we add an Email and separator.  When finished with the loop, we then perform the Send Mail step

                               

                              I must admit I do not understand that explanation. Can you please clarify further.

                               

                              Many thanks for your assistance.

                               


                              • 12. Re: Email Module
                                TSGal

                                antno43:

                                 

                                Again, sorry for the late response.  The reason for this last case is trying to catch up on posts.

                                 

                                The script keeps adding names to the Global field.  Therefore, setting it to nil to begin would be wise, so you don't send information to the same people again.  Therefore, the script step before the loop would be:

                                 

                                Set Field [ Contact::ListOfNames; "" ]

                                 

                                Put a "Halt Script" command after the End Loop.  That is, don't execute the Send Mail script.  Just to make sure this is working properly, manually copy the contents of "Contact::ListOfNames", which should now have your entire list, open Outlook, create a new email message and paste into the "To:" field.  All of your addresses should now display separated by semi-colons.  If this isn't occurring, then there may be a problem with pasting into Outlook.

                                 

                                TSGal

                                FileMaker, Inc.

                                • 13. Re: Email Module
                                  antno43
                                    

                                  The Set Field was already entered as you have noted.

                                   

                                  I have added the Halt Script as advised.

                                   

                                  I have copied two of the names from the Contact Picker and pasted them into Outlook as long as I leave a space between each address Outlook automatically places a semi colon between each address after pressing the tab key.

                                  So if this is the result you were looking for Outlook doesn't have any problems.

                                   

                                  So what now.

                                   

                                  Do I leave the Halt Script in place? or was that simply for this test.

                                   

                                   

                                  • 14. Re: Email Module
                                    TSGal

                                    antno43:

                                     

                                    This was simply a test.

                                     

                                    When you pasted them in, there wasn't a problem?  Or, did you have to put a space between them?  If the latter, then you'll have to change the script to include a semi-colon and space instead of just a semi-colon.  The formula for that field would be:

                                     

                                    Set Field [ Contact::ListOfNames; Contact::ListOfNames & Contact::email & "; " ]

                                     

                                    Run the script again, and paste into a new email.  If this works fine, then you can remove the Halt Script step.

                                     

                                    TSGal

                                    FileMaker, Inc.

                                    1 2 Previous Next