Click here to Skip to main content
16,018,650 members

Comments by iyalarasi (Top 28 by date)

iyalarasi 24-Oct-12 0:27am View    
Actually with this code,I can't get any error,I have mail in my outbox in outlook, and it doesn't send mail to inbox. Is that necessary to have internet connection in emulator to send mail?
iyalarasi 22-Oct-12 8:02am View    
but in,windows mobile applicatio I am not giving any smtp server name, then what is the connection in between that.
Actually I am creating mobile application, and i am using the folloing code to send mail from my application.
since I am using microsoft.windowsmobile.pocketoutlook I am not able to use smtp in that.
My code is,

private void btnsubmit_Click(object sender, EventArgs e)
{
try
{

totleave();
OutlookSession ol = new OutlookSession();
EmailMessage em = new EmailMessage();
//Recipient s1 = em.From;
//Console.WriteLine(s1);
Recipient r = new Recipient("iyalarasi.r", "iyalarasi.r@winxsolutions.com");
em.To.Add(r);
em.Subject = "Request For Leave";
em.BodyText =txtename.Text +"("+txteno.Text+ ")" + "request"+ cb1.SelectedItem.ToString()+" leave from "+dtpfrom .Value .ToShortDateString ()+"to"+dtpto .Value.ToShortDateString () + "\n The reason is" + txtreason.Text;
EmailAccount ea = ol.EmailAccounts[0];
ea.Send(em);
// em.Send("iyalarasi.r");//Account name in outlook
//MessagingApplication.Synchronize("iyalarasi.r");
MessageBox.Show("mail sent");
Form2 f2 = new Form2();
f2.Show();
f2.lblmsg.Text = "You have Applied Leave";
}
catch (PocketOutlookException ex)
{
lblmsg1.Text = ex.ToString();
}
catch (Exception e1)
{
lblmsg1.Text = e1.ToString();
}

}
how can I give smtp server name in that,It doesn't support system.net.mail namespce.
Please help me.
iyalarasi 22-Oct-12 3:29am View    
sorry for asking too many questions?
iyalarasi 22-Oct-12 3:29am View    
now I am run this application,and now i got mail in mobile->outlook->outbox application. but i can't receive mail in my inbox in that mobile platform.
And I have one more doubt that,If I send mail from my mobile application, can we see that in my computer?
iyalarasi 22-Oct-12 3:13am View    
I use same code and confiure my mail account in mobile device.now In my outbox in mobile device contain messages, but in my inbox there is no msg is available.
And I have one doubt that is that we can't send mail from mobile to computer?
Please clarify my doubts.

sorry for asking too many questions.