Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

Please clarify my doubt,
Is that necessary to have internet connection to send mail from mobile application,
we need to connect windows professional6.5 to internet to send mail to outlook account?

In my application, mails are stored in outbox,it doesn't come to inbox folder.

after searching so many blogs,I assumed this.
Is that true?

Please give me some explanation to understand this one?

I am new to this windows mobile.

Please help me out to solve this problem. Its very urgent
Posted

1 solution

To send an e-mail, yes you'll need a network connection. As to send an e-mail you'll need to pass the e-mail message to an SMTP server.

Although that doesn't mean you need to online to write an e-mail. You could write an e-mail, store the data in a cache, similar to the Outlook "Outbox". And keep it there until the SMTP becomes available.
 
Share this answer
 
Comments
iyalarasi 22-Oct-12 8:02am    
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.
Stephen Hewison 22-Oct-12 8:06am    
And what's wrong with this code? What error message/behaviour are you seeing which isn't the desired result?
iyalarasi 24-Oct-12 0:27am    
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?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900