5 Replies Latest reply on Jan 12, 2010 8:43 AM by philmodjunk

    Recording emails sent?



      Recording emails sent?


      Hi all.


      I have a personnel database (two tables), with a email form.

      The form is accessed by clicking on the email address of the personnel member (table1). 

      Emails are sent OK (via SMTP) using the data entered in the fields (table2):

      'sender email'

      'sender message'


      I need to keep the email and message entered, so that we can see who emailed who and what was the message, but am not sure how to catch and attach this to the individual personnel record. 


      The database lives on FMPro 10 Server Advanced and is accessed via IWP.


        • 1. Re: Recording emails sent?
             Send a copy email to a Gmail address that you own?
          • 2. Re: Recording emails sent?
               Thanks David, but not a solution.
            • 3. Re: Recording emails sent?
                 I'd set up an "email" log table and related it to a table of users. Sending the email from filemaker can be a scripted event and part of your script can log the "to" and "from" info (plus any other info you want to track) in this log table.
              • 4. Re: Recording emails sent?

                Thanks Phil.

                Sounds like a solution.

                Sorry, but due to my 'noviceness', do you have any simple steps/instructions/examples? 

                • 5. Re: Recording emails sent?

                  Well, I don't have direct access to an email client, (Office too small, boss too cheap), but I can walk you through the basics of logging the email after you've sent it from Filemaker via email client or SMTP.


                  When you send an email, you can designate specific fields for the To, BCC, Subject, and Body portions of your email. If you are calculating these items, you can use a set field instruction with the same calculation to store the data in a text field. For simplicity, let's start with a basic set of text fields.


                  Let's say you have a table called "Email" with the following fields: To, From, Subject, Body, DateTimeSent


                  You can set up a data entry layout based on the Email table where your users can compose an email to be sent. Put a button, "send", on this script to do at least the following two steps:


                  Send Mail [Send via email client; No Dialog; To: Email::To ; Subject: Email::Subject; Message: Email::Body]

                  Set Field [Email::From ; Get (AccountName)]

                  Set Field [Email::DateTimeSent ; Get ( CurrentTimeStamp ) ]


                  (I'm assuming that each user has a unique AccountName in Accounts and privileges)


                  That's basically it for emails sent to a single recipient. In cases where there are multiple recipients, you may have to add some code that captures all the email addresses in a list stored in the "to" field.