5 Replies Latest reply on May 11, 2015 1:08 PM by sporobolus

    url in send mail line breaking.

    malachydevlin

      Dear all,

      I have a url that is sent in a "send mail" calculation but it keeps splitting the last part of this into a 2nd line so therefore it cant be clicked on the email as a hyperlink.

       

      e.g the calc is

      "http://fmp://"&ExecuteSQL ( "SELECT SERVERIP FROM CONFIGURATION" ; "" ;"" )&"/CRM_App_Deploy?script=install_update&param="&MOBILE_APPLICATIONS::ID

       

      the last part (the parameter) is being disconnected from the url in the email so it looks like

       

      http://blablabla?param=

      2

       

      Thanks a lot.

        • 1. Re: url in send mail line breaking.
          mikebeargie

          If you split out your function into a let() statement, something like:

           

          Let([

             base = "fmp://";

             sql = ExecuteSQL ( "SELECT SERVERIP FROM CONFIGURATION" ; "" ;"" );

             script = "/CRM_App_Deploy?script=install_update&param=";

             param = MOBILE_APPLICATIONS::ID;

             string = base & sql & script & param;

             safe = substitute ( string ; "¶" ; "" )

          ];

             safe

          )

           

          it will be easier to look at and prepare for use. Also make sure to drop things like this into the data viewer so you can see how FileMaker is rendering your calculation.

          • 2. Re: url in send mail line breaking.
            Mike Duncan

            When sending mail as text, you have very limited control over line wrapping by email clients or smtp servers. You could possibly use a url shortening service like bitly or something.

             

            Natively, filemaker only sends email as plain text, but there are plenty of ways to send html email. That would allow you to format the link as html so it wouldn't break, and have much better control over formatting the text. You can use a plugin or web service (thrid party or roll your own) to send them.

             

            Mike

            • 3. Re: url in send mail line breaking.
              malachydevlin

              works a treat, I really need to brush up on the LET statement, its something I never ventured into too much but it seems I need to.

              thanks Mike.

              • 4. Re: url in send mail line breaking.
                mikebeargie

                +1 on having an email plugin. Full HTML email support will help overcome a lot of barriers that the native send mail script step has.

                • 5. Re: url in send mail line breaking.
                  sporobolus

                  On 2015-05-11 6:55 , Mike Duncan wrote

                  When sending mail as text, you have very limited control over line wrapping by email clients or smtp servers. You could possibly use a url shortening service like bitly or something.

                   

                  in plain text email, standards documents state that URLs delimited with

                  angle brackets should be "rejoined" by the email client if they happen to be

                  broken by a line-end

                   

                  not all email clients follow the standard, but angle brackets should still

                  increase the likelihood of long URLs coming through intact