locked
How to send Email Within the Application in windows metro app using javascript? RRS feed

  • Question

  • Hi 

    I am developing an application. where i need to send email.

    On clicking of button i am launching mail app using this code

    var mailto = new Windows.Foundation.Uri("mailto:?to=mymail@gmail.com&subject=my subject &body=Hello from a Windows 8 Metro app.");
     Windows.System.Launcher.launchUriAsync(mailto);

    I have 2 question---

    1. this code launching mail app in new windows with to,subject,body parameter. on sending mail that app stick in that mail app.

    i just want to sure that on sending that mail it will again come to my original app.

    2. is it possible to resize the size of mail app on launching it.

    Waiting for favorable response!!

    Thanking You, 

    Monday, February 4, 2013 9:03 AM

Answers

All replies

  • Hi Amit,

    1. No you cannot force it to come back to the app that initiated the mail call.

    2. No you cannot control the windows size of the mail app when you launch it.

    -Jeff


    Jeff Sanders (MSFT)

    Monday, February 4, 2013 2:01 PM
    Moderator
  • Hi Jeff Sanders,

    Thank you for your reply!!

    Can you please suggest me any solution regarding this  problem?

    Is there any way to send mail,SMS without leaving Application?

    This is not a right approach that you can't come back to your native app.

    In my Application i am trying to provide email/sms/call. calling is working fine but i am facing problem with sms and email

    :(

    please suggest some solution

    waiting for your reply!!

    thanking you,

      

    Monday, February 4, 2013 5:36 PM
  • Hi Amit,

    There is no solution that we offer that will work this way.  You can try sending SMTP traffic yourself to a server your users are authorized on or you could create a webservice you can call and mail from there.

    -Jeff


    Jeff Sanders (MSFT)

    Monday, February 4, 2013 7:26 PM
    Moderator
  • I had this problem before. In .NET application, I used System.Net.Mail, however, it missed in Windows Runtime Assembly.  Finally I used a third-party solution in my project, you can have a look at it:

     

     Send Email in JavaScript from Windows Store Apps - HTML5 - Tutorial

    Wednesday, July 10, 2013 9:04 AM