3 Replies Latest reply on Feb 7, 2013 11:23 AM by DavidJondreau

    Send Mail with Gmail




      Forgive me if this issue was answered somewhere else, and in that case please direct me there.


      I want to set up a script that creates a pdf of an Estimate and attaches it to an email. The email should not be sent but open up so that the user can edit the contents of the email but the pdf should already be atached.


      Two options, tell me if I'm on the right track.


      1. Create a pdf using the 'save as pdf' script step. File path is a variable $Path which I can then insert into the 'attach file' part of the send email script. Ideally this should attach that same pdf that was just created to the email. I tried this and I'm getting error 130. which brings me to my next issue, my clients are using gmail, not apple mail. How do I get gmail to open an email with the file attached.


      2. seems more likely that I will have to do this. Create a field for 'send to' 'cc' 'subject' 'body' etc, where they can enter what they want to say in the email and send it via SMTP without them seeing it. Any suggestion on how to do this or if I should stop barking up this tree altogether?


      I wish you all a good night

        • 1. Re: Send Mail with Gmail

          FileMaker has two Send Mail options, Client and SMTP. For Client you need to be using an actual application client, a web-based e-mail provider won't work.


          Creating a utility layout to send mail via SMTP is not very difficult and pretty effective.

          • 2. Re: Send Mail with Gmail

            Thanks David,


            I will build that utility layout.

            Seems like thats the way to go.

            I'm thinking I'll create a user table with their email info that they can input once. That way, every time they run the script they will not need to input their email and password.


            • 3. Re: Send Mail with Gmail

              Will each user have their own e-mail settings, or is everyone sharing one set of credentials? If it's the former, it's a good idea to have a "Users" table with their info, otherwise you want to put the credentials in a single record utility table. On startup have a script load the appropriate credentials into global variables and reference those variables in the script step.