10 Replies Latest reply on Aug 15, 2016 7:42 AM by RonSSA

    window.location.href = "mailto:..." not working in IOS, but it does in Android.

    RonSSA Level 1

      Hello, I have a strange problem I can't figure out.  I created an app in phonegap build for IOS and Android with a button that uses javascript to open a new e-mail.  It was working in an earlier release and still works in Android.  For some reason it stopped working in IOS about the time phonegap build started displaying the message about supporting a new version of phonegap.  At first I thought it might be something I did so I re-built an older version that previously worked.  Now, It no longer works either, so I don't think it's my code.  I played around with adding/removing plugins from my config.xml but nothing works.  Here's a snippet of the javascript code:

      var body = "Please provide a quote for " + pieces + " pieces of " + metal + " " + shapeText + ", " + dimensions + ".";
       
      window.location.href = "mailto:sales@withheld.com?subject=Request for quote&body=" + body;

       

      Regular links such as the following DO work:
      <a href="mailto:sales@withheld.com?subject=Contact request&body=Please contact me as soon as possible." data-rel='external'>sales@withheld.com</a>

       

      I've tried doing the hokey pokey with plugins but none of them seem to be causing the problem (taking them out, putting them in)

       

      I asked this question in the phonegap forum and it got rejected without reason.  I since found some posts talking about the CLI 6.3 upgrade and updated my config.xml with:

      <preference name="phonegap-version" value="cli-5.2.0" />

       

      This fixed the problem, but I'd like to know how to make it work in the latest CLI version.

       

       

      Any idea how to get this working again?

       

      Ron