11 Replies Latest reply on Apr 8, 2013 1:42 PM by Kitchenscapes

    Create PDF and Send Email

    Kitchenscapes

      Title

      Create PDF and Send Email

      Post

           I think I have read every post on this topic and still cant get PDF to attach. FM11 Adv

           Create PDF using variable, $filepath= "file:" & Get(DesktopPath) & "Test.pdf"

           tried filewin: same result ,  tried Get(Docu...

           PDF created ok, it is not open when I try to send.

           Send email with attached = $Filepath                 error 1506.

           I can send email without attachment works fine, so I assume smtp parameters are ok.

           I copied code directly examples, simple.

           tks for any insight in advance

            

        • 1. Re: Create PDF and Send Email
          symbister

               is it possible that $filepath variable name is case-sensitive ?

          • 2. Re: Create PDF and Send Email
            Kitchenscapes

                 Tks, but that is just a typo, in the script it is $Filepath... I think Im out of ideas

            • 3. Re: Create PDF and Send Email
              Kitchenscapes

                   I removed the string "File:" from the path and it worked, I am on a different computer so i will try it later when i get home where I orig had problem.

                   Can anyone tell me why. Also we have 6 computers at work on a network (Im on the host)  and It works on all. As most examples showed Filewin or Filemac . Is this ok?

                    

              • 4. Re: Create PDF and Send Email
                JimMac

                     I am a bit confused, please clear up where and when you get the "error"

                     1) When YOU are on a separate computer?  [I assume testing the Served DB]

                     OR...

                     2) When you are on the HOST computer at work using Open Remote... to access the DB?

                     Tip: All cases must have a PDF viewer to open it.

                     Jim...

                • 5. Re: Create PDF and Send Email
                  Kitchenscapes

                       The only condition I changed was to remove the "File:" from the the path and have it begin with Get(DesktopPath), that being said, at work it seems to work perfectly. I can attach from the computer that hosts the db and two of the open remotes. (havent tried the others yet.).

                       I brought a copy of the db home and it will not attach the pdf. IF I do not attach $$FilePath, it will send the email fine, if I attach the pdf  it will always sends the email but the error code is intermittent. Since the examples I have seen include File or Filewin, how is it that it works without it.

                       Pdf viewer to open... the pdf is always being created, and it is not open when i try to attach.

                       I tried it with out the $$Filepath var and referenced the test.pdf directly, still same.

                       Still trying things but doesnt work on home computer, At work db is in the documents folder and pdf on desktop, at home both were on the desktop but I tried moving into documents folder, still same. Any ideas will be appreciated...  thinking something with paths but ran out of things to try.

                  • 6. Re: Create PDF and Send Email
                    philmodjunk

                         "File:" won't work but "file:" should. That inital tag is, for some strange reason, case sensitive. But later version of FileMaker can do this without the "file:" tag at all--which might explain while removing it solved the inital problem. But I myself got tangled up in this one when I tried a solution I had set up in FileMaker 11 on a Filemaker 10 system. FileMaker 10 required the "file:" and FileMaker 11 could function correctly without it.

                    • 7. Re: Create PDF and Send Email
                      JimMac

                           @Peter  Tip: Be sure and Open Remote... even if you are on the HOST computer, a direct Open on the HOST does some unusal things too.

                           Jim...

                      • 8. Re: Create PDF and Send Email
                        Kitchenscapes

                              

                             Phil, JIm,

                             I did have the string as "file:", I copied examples exactly.  Still cannot get it to work at home, but it does from work on the host even when opened directly. Could the actual filepaths have anything to do with it ?  Any help would be appreciated.

                              

                        • 9. Re: Create PDF and Send Email
                          JimMac

                               Well this link might help explain... Error 1506

                          FileMaker 10 Send Email Error 1506 with Large Attachment

                               Jim...

                          • 10. Re: Create PDF and Send Email
                            JimMac

                                 I read it... surprise

                                 Sounds like it is the email server at your home.wink

                                 I can only stress that I went nearly Bananas on testing a HOSTed file and did finally saw [Thanks to Phil's Questions] I was not using Open Remote...  You bypass all security issues and puts you in a weird state of "hot fixing" the host while Clients can be active.

                                 Jim...

                            • 11. Re: Create PDF and Send Email
                              Kitchenscapes

                                   Jim,

                                    I was not logged on to my home computer as "Admin", now it works. Funny thing is the email did go without an attachment, I think that what threw me.

                                   Also I hotfix all the time, guess I will stop that now...

                                    

                                   I do thank you guys for your help, as I am new to the forum and will stumble again...