windows mobile application RRS feed

  • Question

  • hi,

    I am developing window mobile application. In that I want to send mail when submit button is clicked.

    I have used the following code,here I didn't mention to address.
    private void btnsubmit_Click(object sender, EventArgs e)
                    OutlookSession ol = new OutlookSession();
                    EmailMessage em = new EmailMessage();
                    em.To.Add(new Recipient("iyal",""));
                    em.Subject = "Request For Leave";
                    em.BodyText = txteno.Text + "request" + cb1.SelectedItem.ToString() + "leave for" + txtreason.Text;
                    EmailAccount ea = ol.EmailAccounts[0];
                    MessageBox.Show("mail sent");
                    Form2 f2 = new Form2();
                    f2.lblmsg.Text = "You have Applied Leave";
                catch (Exception ex)
                   lblmsg1 .Text = ex.ToString();

    It shows the mail sent msgbox.It doesn't give any error,at the same time I didn't receive mail in my outlook.

    Please Help me.
    I need to complete this task.
    I am new to mobile application.

    • Moved by Jie Bao Friday, October 19, 2012 3:14 AM (From:Application Compatibility for Windows Desktop Development)
    Thursday, October 18, 2012 12:54 PM


All replies