8 Replies Latest reply on Apr 18, 2012 8:56 AM by philmodjunk

    Strange behaviour using email script step and Windows

    PJSpark

      Title

      Strange behaviour using email script step and Windows

      Post

      Hello,

      I created a small script that creates a pdf from a report and then emails the pdf using the email script step and the smtp option. I was trying all possible combinations, and every time the "Can't send email(s) message would come up. So I took the database file and loaded it on my Mac at home, and it ran through perfectly first time! Has anyone else had any experience with email not working on Windows 7 machines, but will work on a Mac? At least I now know the settings are correct.

      Thanks,

       

      P.S. On a totally unrelated note, is there a way to change your email address for these forums? I couldn't find it under profile.

        • 1. Re: Strange behaviour using email script step and Windows
          philmodjunk

          Just in case it's a factor, please share your script and the specific options you specified in the send mail dialog.

          I've sent a private message to ModMan about the account info issue. Like you, I can select a link titled "edit account" from the my stuff menu, but can't actually modify the info--including my email address--shown there.

          • 2. Re: Strange behaviour using email script step and Windows
            PJSpark

            Phil,

            Thanks for sending the info in the right direction.

            This is the script I use. The settings under email have been proven to be correct from use on a Mac. I'm not sure if the script can tell you why it doesn't work on Windows 7. I have tried it on two Windows 7 machines, 1 64-bit, the other 32-bit.

            • Go to Layout [ “Receipt” (Sale) ]
            • If [ Get ( ScriptParameter )="Email" ]
            • Show Custom Dialog [ Title: "Enter Email"; Buttons: “Send”, “Cancel”; Input
              #1: Store::ClientEmail, "Client Email" ]
            • If [ Get ( LastMessageChoice )=1 ]
            • Save Records as PDF [ File Name: “file:TI_Receipt.pdf”; Current record ] [
              Document - Compatibility: Acrobat 7 and later ] [ Pages - Number Pages From: 1;
              Include: All pages ] [ Security - Printing: High Resolution; Editing: Any except
              extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show:
              Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ] [ Restore;
              No dialog ]
            • Send Mail [ Send via SMTP Server; To: Store::ClientEmail; Subject: "Receipt
              "& Sale::SaleNo;Message: "Thank you for coming
              in¶¶Have a great day!"; Attachment: “file:TI_Receipt.pdf”;
              Name: "PJSpark"; Email Address: Store::Email; SMTP Server:
              "smtp.primus.ca"; Port: 25; Use SSL; Authentication Type: Plain Password; User
              Name: "pjspark@primus.ca"; Password: "coates9804" ] [ No dialog ]
            • End If
            • Else If [ Get ( ScriptParameter )="Preview" ]
            • Enter Preview Mode [ Pause ]
            • Else
            • Print Setup [ Orientation: Portrait; Paper size: 8.5" x 11" ] [ Restore ]
            • Print [ ]
            • End If
            • Enter Browse Mode
            • Go to Layout [ “Sales” (Sale) ]
            • 3. Re: Strange behaviour using email script step and Windows
              philmodjunk

              No obvious script errors jump out at me.

              If you select send mail from the file menu can you use the smtp option to send an email to yourself?

              • 4. Re: Strange behaviour using email script step and Windows
                PJSpark

                Phil,

                No. Same error. Could it be an incompatability with Windows 7? I don't have another OS to try. These machines are patched with the latest updates. Aside from some windows standard stuff, AVG is about the only program in the task bar running.

                • 5. Re: Strange behaviour using email script step and Windows
                  philmodjunk

                  It's not impossible, but it's also possible that something is not configured correctly on that specific machine. I lack the info to tell you what to check next, however...

                  • 6. Re: Strange behaviour using email script step and Windows
                    Sorbsbuster

                    (I hope the username and passwords are not valid in the posted example?)

                    What happens if you temporarily disable the steps that include the attachment?

                    • 7. Re: Strange behaviour using email script step and Windows
                      PJSpark

                      Phil,

                      I've tried this on three machines. The one I'm developing this on does not have email setup, but does have an internet connection, and is a Windows 7 machine. The other Windows 7 machine is on the same network, but also has a working email client that sends and receives emails all day long. The third is a Mac laptop on my home network, which worked perfectly in the scripts' current incarnation. I'm not sure what to do, if nobody else has similar experience. Maybe I will bring the Mac laptop to the office, and make sure it runs here. I can send an email on the Windows machine using the email client option.

                       

                      Sorbsbuster,

                      You are correct. That is bogus data. I've tried sending just a plain simple email without attachment, with same results.

                       

                      As far as I know, internet access is the only prerequisite for using smtp with send email. I do have a security camera here which sends emails when motion is detected, using a similar setup of smtp options, which works fine from this machine without an actual email client.

                      Thanks for the input!

                      • 8. Re: Strange behaviour using email script step and Windows
                        philmodjunk

                        I suggest making a post in Report an Issue (see tab at top of this screen) and including a link to this thread in your issue report. Perhaps the FileMaker Tech folks can spot what we are not seeing here or they can confirm the existance of a bug with FileMaker and Windows 7 smtp emails...