4 Replies Latest reply on Aug 12, 2016 3:23 PM by RonSSA

    javascript mailto stopped working for IOS

    RonSSA Level 1

      Hello, I have a strange problem I can't figure out.  I created an app 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 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 including all the following plugins in my config.xml (based on the example app):

      <plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1"/>


      <plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1"/> 
      <plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0"/> 
      <plugin name="cordova-plugin-console" source="npm" spec="~1.0.2"/> 
      <plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1"/> 
      <plugin name="cordova-plugin-device" source="npm" spec="~1.1.1"/> 
      <plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0"/> 
      <plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2"/> 
      <plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0"/> 
      <plugin name="cordova-plugin-file" source="npm" spec="~4.1.1"/> 
      <plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0"/> 
      <plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0"/> 
      <plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3"/> 
      <plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0"/> 
      <plugin name="cordova-plugin-media" source="npm" spec="~2.2.0"/> 
      <plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0"/> 
      <plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.2"/> 
      <plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2"/> 
      <plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0"/> 
      <plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1"/>


      I only really use the following:

      <plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.2"/> 
      <plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1"/>



      Any idea how to get this working again?