locked
Sharing content to email target app. RRS feed

  • Question

  • I want to know "Email To" Property Key in  DataPackage.Properties.

    I would to share Email To from my app.

    Thank you :)

    Friday, August 2, 2013 8:51 AM

Answers

  • There is no such thing. The app provides the raw data to share. The user chooses who to share with and how.

    If you specifically need email you can launch a mailto: link. Think hard about if email is actually important. In most cases it is not: either letting the user choose through the share contract is best or connecting directly to a specific service is best.

    --Rob

    • Marked as answer by Korawit Monday, August 5, 2013 7:11 AM
    Friday, August 2, 2013 2:49 PM
    Moderator
  • Me using this codes Not: MailAppBarButtonStyle I draw and I putted in StandartStyles.xaml than you can bind if you need I can give you style 2 ;)

    // xaml code <Button x:Name="AppBarMailButton" Content="" Style="{StaticResource MailAppBarButtonStyle}" Height="87.766" Margin="0,12.117,0,-0.117" Width="78" Click="AppBarMailButton_Clicked" ToolTipService.ToolTip="şikayet ve önerileriniz için mail gönderin" /> // C# code private async void AppBarMailButton_Clicked(object sender, RoutedEventArgs e) { var mailto = new Uri("mailto:?to=put here your email Adress&subject=put here Subject&body=Hello from a Windows 8 Metro app."); await Windows.System.Launcher.LaunchUriAsync(mailto); } I hope its help to some one ;)



    <(+)>--C#_WPF_SİLVERLİGHT_XBAP_HTML5--WCF_<(+)>

    • Marked as answer by Korawit Monday, August 5, 2013 7:18 AM
    Friday, August 2, 2013 4:13 PM

All replies

  • There is no such thing. The app provides the raw data to share. The user chooses who to share with and how.

    If you specifically need email you can launch a mailto: link. Think hard about if email is actually important. In most cases it is not: either letting the user choose through the share contract is best or connecting directly to a specific service is best.

    --Rob

    • Marked as answer by Korawit Monday, August 5, 2013 7:11 AM
    Friday, August 2, 2013 2:49 PM
    Moderator
  • Me using this codes Not: MailAppBarButtonStyle I draw and I putted in StandartStyles.xaml than you can bind if you need I can give you style 2 ;)

    // xaml code <Button x:Name="AppBarMailButton" Content="" Style="{StaticResource MailAppBarButtonStyle}" Height="87.766" Margin="0,12.117,0,-0.117" Width="78" Click="AppBarMailButton_Clicked" ToolTipService.ToolTip="şikayet ve önerileriniz için mail gönderin" /> // C# code private async void AppBarMailButton_Clicked(object sender, RoutedEventArgs e) { var mailto = new Uri("mailto:?to=put here your email Adress&subject=put here Subject&body=Hello from a Windows 8 Metro app."); await Windows.System.Launcher.LaunchUriAsync(mailto); } I hope its help to some one ;)



    <(+)>--C#_WPF_SİLVERLİGHT_XBAP_HTML5--WCF_<(+)>

    • Marked as answer by Korawit Monday, August 5, 2013 7:18 AM
    Friday, August 2, 2013 4:13 PM
  • Thank you , Rob.
    Monday, August 5, 2013 7:18 AM
  • Me using this codes Not: MailAppBarButtonStyle I draw and I putted in StandartStyles.xaml than you can bind if you need I can give you style 2 ;)

    // xaml code <Button x:Name="AppBarMailButton" Content="" Style="{StaticResource MailAppBarButtonStyle}" Height="87.766" Margin="0,12.117,0,-0.117" Width="78" Click="AppBarMailButton_Clicked" ToolTipService.ToolTip="şikayet ve önerileriniz için mail gönderin" /> // C# code private async void AppBarMailButton_Clicked(object sender, RoutedEventArgs e) { var mailto = new Uri("mailto:?to=put here your email Adress&subject=put here Subject&body=Hello from a Windows 8 Metro app."); await Windows.System.Launcher.LaunchUriAsync(mailto); } I hope its help to some one ;)



    <(+)>--C#_WPF_SİLVERLİGHT_XBAP_HTML5--WCF_<(+)>

    " mailto: " can attachment?

    • Proposed as answer by serkan cakmak Wednesday, August 7, 2013 1:43 PM
    • Unproposed as answer by serkan cakmak Wednesday, August 7, 2013 1:44 PM
    • Proposed as answer by serkan cakmak Wednesday, August 7, 2013 1:44 PM
    Tuesday, August 6, 2013 7:25 AM
  • Korawit  I dont think mailto can attachment  my answer is no  insted of  mailto   use share content so from your windows store app  you can share everthings to any email 

    //c# code:
    using Windows.ApplicationModel.DataTransfer; // this name space if needed for share target
    
     protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
            {
                DataTransferManager.GetForCurrentView().DataRequested += OnDataRequested;
            }
            protected override void SaveState(Dictionary<String, Object> pageState)
            {
                  DataTransferManager.GetForCurrentView().DataRequested -= OnDataRequested;
            }
    
     void OnDataRequested(DataTransferManager sender, DataRequestedEventArgs args)
            {
                var request = args.Request;
                request.Data.Properties.Title = "here Title";               //or any text you want to share
                request.Data.Properties.Description = pageTitle.Text; //"This is the text of the textbox I’d like to share with you";
                var body = infoContent.Text;                                     //"Now you can make search contract as you like you can add many thing and make any application that you are using to search to use this text or image";
                request.Data.SetText(body);
    
                request.Data.SetUri(new Uri(this.TurkeyHotelsWebView.Source.ToString()));  // share link
            }
    

    if you want to see how is work I give you  my app link and test it how you can share to any email  ah before forget I see new behavior at 8.1 when you open share charm you can share screan print of your app  see  link

    TURKEYHOTELS

    I hope its help to some one


    <(+)>--C#_WPF_SİLVERLİGHT_XBAP_HTML5--WCF_<(+)>

    Wednesday, August 7, 2013 2:04 PM