mailto +多个地址不适用于移动Chrome吗?

时间:2016-03-02 21:15:42

标签: mailto

http://fbnydob.applinzi.com/mailceshi.php?e=test@example.com+example@test.com

<?php
    if (!sizeof($_GET)){   
                        //some code                   
    } else { ?>

  <html>
  <head>
      <meta name="viewport" content="width=device-width" />


      </head>
      <body style="margin:0;padding:0">
    The mail is going to be sent to
      <br>

      <div id="email" style="width:100vw;">

    </div>

  </body>
  <script>
    query = location.search;
    query = query.replace(/\+/g,',');
    query = query.replace('?e=','');
    show = query.replace(/,/g,', ');
    document.getElementById('email').innerHTML = show;

          location.href = "mailto:" + query;

  </script>
  </html>

<?php } ?>

基于网址参数发送电子邮件的非常简单的页面。奇怪的是,如果我在Mac或桌面Chrome上打开它,它将打开Mail程序;但是,在移动Chrome中,它并不起作用。知道什么是错的吗?

1 个答案:

答案 0 :(得分:0)

mailto URI方案随着时间的推移而发生了变化。 RFC 2368(1998)只指定一个地址;过时2368的RFC 6068(2010)允许多个以逗号分隔的目的地。有问题的用户代理可能只实现以前的规范。

不仅如此,你使用了错误的分隔符:

  

to = addr-spec *(“, addr-spec

相关问题