locked
Email using button RRS feed

  • Question

  • Hello,

    I have been building an Email application, Somehow i have succeeded in sending an email through SMTP client to the recipient. But now how can i send the email when the user enters his details in the textboxes in my application. Looking forward for the source code.

    Thanks & Regards 

    Manideep Mummadi


    manideep

    Friday, September 5, 2014 11:35 AM

Answers

  • WinRT has no built-in email capabilities. You can share content to the default email app, or you can launch the default email app using the mailto: protocol.  Finally, you could host a webservice that takes the email information and sends it out using SMTP, with the app as a front-end host.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, September 5, 2014 2:53 PM
    Moderator

All replies

  • Hi Mummadi ,

    you can use EmailComposeTask in default windows phone libraries. Use your textbox's values as the strings in relevant parameters.

    EmailComposeTask emailComposeTask = new EmailComposeTask();
    
    emailComposeTask.Subject = "message subject";
    emailComposeTask.Body = "message body";
    emailComposeTask.To = "recipient@example.com";
    emailComposeTask.Cc = "cc@example.com";
    emailComposeTask.Bcc = "bcc@example.com";
    
    emailComposeTask.Show();

    Hope that helps
    Please don't forget to up vote answers you like or which help you and mark one(s) which answer your question.

    ---------------------------------------

    M Prabath Maduranga Peiris
    Microsoft Student Partner
    Blogs : prabathsl.blogspot.com

    Friday, September 5, 2014 1:26 PM
  • WinRT has no built-in email capabilities. You can share content to the default email app, or you can launch the default email app using the mailto: protocol.  Finally, you could host a webservice that takes the email information and sends it out using SMTP, with the app as a front-end host.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, September 5, 2014 2:53 PM
    Moderator