2

I am making application in ionic and one of it's functionality to send mail so i have used plugin

problem is i am not able to generate link for android with gmail version > 6.10

Also tried to send mail using apps Gmail, Outlook, Bluemail every mail client giving different output.

Gmail version 6.10(ok) but 6.11(not generating links)

Outlook giving blank result (not event text as other mail client gives)

Bluemail same as Gmail

I'll be thankful if you have any solution of this.

EDIT Sorry if you misunderstood "generate link" means using html content(<a href="...">)

chris
  • 699
  • 4
  • 12
  • 35

1 Answers1

1

Was using the plugin myself also, lots of problems and poorly maintained, just check their Github issues page to confirm, use this instead and you can specify to send via email using .shareViaEmail and include link in there.

Use var bodyText = document.getElementById("aaa").href; to get value for link, surely you must have <div><a href=‘YOURLINK’ id='aaa'>texthere</a></div> in HTML. Then pass it as as a message .shareViaEmail("PASS IT HERE",

Olli
  • 512
  • 3
  • 6
  • 22
  • thanx for your quick reply @Olli i have checked installing your suggested plugin but still the same issue as do with gmail client – jasmin pethani Dec 19 '16 at 11:24
  • Did you try passing the link as a file? – Olli Dec 19 '16 at 11:27
  • And can you include your code for generating link via the plugin I suggested? – Olli Dec 19 '16 at 11:30
  • var bodyText = “” $cordovaSocialSharing.shareViaEmail("", “Hello Files", [], [], [], bodyText) .then(function (result) { console.log(result); }, function (err) { console.error( JSON.stringify(err) ); }); – jasmin pethani Dec 19 '16 at 11:41
  • You just passed in an empty `""` in place of message didn't you? Thats where the error is – Olli Dec 19 '16 at 11:46
  • @Oli i passed "bodyText" in place of message but error was still there can you provide sample for this? – jasmin pethani Dec 19 '16 at 11:57
  • @Oli i have array of links and make html text from it and then pass that html text to mention plugin var bodyText = “
    ” mySplitResult.forEach(function (filename, i) { var link_url = urls.server + filename; bodyText += '' + filename + '
    '; }); bodyText += "
    "; I am not getting how to make link from it
    – jasmin pethani Dec 19 '16 at 13:14
  • Please format your code and include with your question above, I can't read that. If you have links, why not put in an array `[]` and then that can be extracted later on or if you have pre-defined links that can be extracted by index. JUST make sure you get the link and `console.log` to make sure you do before passing it. Check this question out: http://stackoverflow.com/questions/15439853/get-local-href-value-from-anchor-a-tag – Olli Dec 19 '16 at 13:28