使用电子邮件编辑器在gmail中未显示超链接

时间:2016-12-07 14:25:07

标签: javascript angularjs ionic-framework gmail

我正在尝试使用电子邮件编辑器发送html作为正文。 html正文包含超链接但它在gmail中不起作用。 Gmail仅显示纯文本。

  var email = {
                          to: sendersemail+';',
                          cc: '',
                          bcc: '',
                          attachments: [cordova.file.externalApplicationStorageDirectory+'Report.pdf'],
                          subject: '',
                          body: '<p><a href="https://thebrainout.com/" target="_blank">the brain out</a> &nbsp;your  I think you&#39;ll find it helpful&nbsp;too.</p>',
                          isHtml: true
                        };

                       $cordovaEmailComposer.open(email).then(null, function () {
                         // user cancelled email
                       });

1 个答案:

答案 0 :(得分:4)

使用html而不是body!

 var email = {
                      to: sendersemail+';',
                      cc: '',
                      bcc: '',
                      attachments: [cordova.file.externalApplicationStorageDirectory+'Report.pdf'],
                      subject: '',
                      html: '<p><a href="https://thebrainout.com/" target="_blank">the brain out</a> &nbsp;your  I think you&#39;ll find it helpful&nbsp;too.</p>'

                    };

                   $cordovaEmailComposer.open(email).then(null, function () {
                     // user cancelled email
                   });