Discussions

 View Only
Expand all | Collapse all

mailto link not posting the body into a new email

  • 1.  mailto link not posting the body into a new email

    Posted 01-12-2021 08:02
      |   view attached
    Hi everyone,

    I have a formula URL button with the following code:

    "mailto:" & [External Email Addresses] & "?subject=" & URLEncode([Email Subject]) & "&body=" & URLEncode([Email Body]) & "&cc=" & URLEncode([Internal Email List])

    The intent is to take a draft of an email written in Quick Base so that we retain a copy of the email attached to our project and when we click on the submit email button it populates the email in Outlook.  For some reason in this one particular email the body is coming in blank.  The screenshot is the form of the record, showing everything filled out properly.

    I get the To, CC, and Subject properly.  Body is blank

    ------------------------------
    Ivan Weiss
    ------------------------------


  • 2.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 08:07
    It is likely the single quote in Hi Jimmy hope you're .....

    Try this

    var text Body = SearchAndReplace([Body],"'",""); // change the single quote to null

    "mailto:" & [External Email Addresses] & "?subject=" & URLEncode([Email Subject]) & "&body=" & URLEncode($Body) & "&cc=" & URLEncode([Internal Email List])

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 12:30
    I gave that a shot and no luck.  Oddly enough, on my mac it drafts the email but the body is blank.  On my PC it does not even draft the email.  I did confirm when I remove body from the mailto statement it works fine.  So it is clearly something in this body that is doing it....

    ------------------------------
    Ivan Weiss
    ------------------------------



  • 4.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 12:34
    In fact I tried cutting the entire body and just typing the word "test" without quotes in there and the button still do not work.  When I remove the &body from the mailto statement the button works right.

    It is a multi-line text field

    ------------------------------
    Ivan Weiss
    ------------------------------



  • 5.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 13:49
    Are you saying that it only fails on this  record?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 6.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 14:23
    Correct, other records work fine.

    ------------------------------
    Ivan Weiss
    ------------------------------



  • 7.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 14:41
    well if the Body is not the culprit, the what's in the other field must be.



    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 8.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 14:44
    What's different  or unusual about the TO and the CC or the Subject?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 9.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 15:03
    But if I eliminate the body from the mailto code it works fine. That is why I am pretty sure it is the body and not to, cc, or subject. Without the body those work.

    ------------------------------
    Ivan Weiss
    ------------------------------



  • 10.  RE: mailto link not posting the body into a new email

    Posted 01-12-2021 16:18
    You say on other records it works, but on his record, when you change the body to just one word like "test" it fails?

    Just on case, what is the email addresses for the TO and CC and Subject for this record?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 11.  RE: mailto link not posting the body into a new email

    Posted 01-20-2021 15:56
    So I tried it again from a different computer just for the fun of it.  The same result, except when I switched the body to test this time the mailto worked. 

    I right now have the following to start stripping out characters I can think of:

    var text BodyFirstStrip = SearchAndReplace([Email Body],"'",""); // change the single quote to null
    var text BodySecondStrip = SearchAndReplace($BodyFirstStrip,"/","");


    "mailto:" & [External Email Addresses] & "?subject=" & URLEncode([Email Subject]) &
    "&cc=" & URLEncode([Internal Email List]) &
    "&body=" & URLEncode($BodySecondStrip)



    Any other thoughts?

    ------------------------------
    Ivan Weiss
    ------------------------------



  • 12.  RE: mailto link not posting the body into a new email

    Posted 01-20-2021 16:00
    I actually did some more googling on this.....  Maybe it is a url limit due to character count?  Any ideas to get around that?

    ------------------------------
    Ivan Weiss
    ------------------------------



  • 13.  RE: mailto link not posting the body into a new email

    Posted 01-20-2021 16:47
    That's not really something you'll be able to get around using the current setup. The only way around that would be to have a Pipeline to generate the email for you based on some trigger.

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------



  • 14.  RE: mailto link not posting the body into a new email

    Posted 01-20-2021 16:59
    How long is your URL. How many characters. If you expose the URL and paste it into a word document you can get it to do a character count for you.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 15.  RE: mailto link not posting the body into a new email

    Posted 01-20-2021 17:51
    That was in excess of 2200 character count on the body (plus the rest of the mailto forming the URL)

    Blake, I guess that could be an interesting option.  I have not looked into the pipeline but would it trigger who it came from or would the email generate from a generic quick base or predetermined email address?

    ------------------------------
    Ivan Weiss
    ------------------------------