title: Send email with wpf
body: <p>Hi i am trying to send email in a wpf app but i get stuck;
  i show my xaml code </p>
  
  <pre><code> &lt;Grid&gt;
      &lt;Button     Style="{DynamicResource ShowcaseRedBtn}"  CommandParameter="test@ygmail.com" Tag="Send Email" Content="Button" Height="23" HorizontalAlignment="Left" Margin="351,186,0,0" Name="button1" VerticalAlignment="Top" Width="140" Click="button1_Click" /&gt;
      &lt;TextBox Height="23" HorizontalAlignment="Left" Margin="92,70,0,0" Name="txtSubject" VerticalAlignment="Top" Width="234" /&gt;
      &lt;TextBox AcceptsReturn="True" AcceptsTab="True"   Height="159" HorizontalAlignment="Left" Margin="92,121,0,0" Name="txtBody" VerticalAlignment="Top" Width="234" /&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>and here in the code behind :</p>
  
  <pre><code> private void button1_Click(object sender, RoutedEventArgs e)
      {
          Button btn = sender as Button;
          if (btn == null)
              return;
          string url = btn.CommandParameter as string;
          if (String.IsNullOrEmpty(url)) 
              return;
          try
          {
              // here i wish set the parameters of email in this way 
              // 1. mailto = url;
              // 2. subject = txtSubject.Text;
              // 3. body = txtBody.Text;
              Process.Start("mailto:test@gmail.com?subject=Software&amp;body=test ");
          }
          catch (Exception ex)
          {
              MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
          }
      }
  </code></pre>
  
  <p>my purpose is set the parameters of the email binding the data from the form :
                   // 1. mailto = url;
                  // 2. subject = txtSubject.Text;
                  // 3. body = txtBody.Text;</p>
  
  <p>Do you have any idea how work out this step?</p>
  
  <p>Thanks so much for your attention.</p>
  
  <p>Cheers</p>