IT Community - Software Programming, Web Development and Technical Support

Retrieve mails from server

This is a discussion on Retrieve mails from server within the C# Programming forums, part of the Software Development category; I want to retrieve the email in my mail server using C#. That was like common method for all servers.......


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 12-14-2007, 01:52 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 881
kingmaker is on a distinguished road
Send a message via MSN to kingmaker
Default Retrieve mails from server

I want to retrieve the email in my mail server using C#.

That was like common method for all servers....
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 12-14-2007, 01:53 AM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 135
Anandavinayagam is on a distinguished road
Default Re: Retrieve mails from server

this one is used to commect ur pop mail server

public void Connect(string server, string username, string password)
{
string message;
string response;

Connect(server, 110);
response = Response();
if (response.Substring(0, 3) != "+OK")
{
throw new Pop3Exception(response);
}

message = "USER " + username + "\r\n";
Write(message);
response = Response();
if (response.Substring(0, 3) != "+OK")
{
throw new Pop3Exception(response);
}

message = "PASS " + password + "\r\n";
Write(message);
response = Response();
if (response.Substring(0, 3) != "+OK")
{
throw new Pop3Exception(response);
}
}
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 12-14-2007, 01:58 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 881
kingmaker is on a distinguished road
Send a message via MSN to kingmaker
Default Re: Retrieve mails from server

i think it is depending on
Pop3Exception
response

...like that .......can u provide full source code for the POP
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 12-14-2007, 02:00 AM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 135
Anandavinayagam is on a distinguished road
Default Re: Retrieve mails from server

yeah.......i will attach the code here POPMail.zip
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 12-14-2007, 10:33 PM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 135
Anandavinayagam is on a distinguished road
Default Re: Retrieve mails from server

can u explain the pop mail server for yahoo,google,...and ports that are used in connect method
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 12-14-2007, 10:41 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 881
kingmaker is on a distinguished road
Send a message via MSN to kingmaker
Default Re: Retrieve mails from server

Yahoo Incoming Mail Server (POP3) - pop.mail.yahoo.com (port 110)

Yahoo Outgoing Mail Server (SMTP) - smtp.mail.yahoo.com (port 25)

Google Gmail Incoming Mail Server (POP3) - pop.gmail.com (SSL enabled, port 995)

Outgoing Mail Server - use the SMTP mail server address provided by your local ISP or smtp.gmail.com (SSL enabled, port 465)

You can use that
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 12-14-2007, 10:42 PM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 135
Anandavinayagam is on a distinguished road
Default Re: Retrieve mails from server

ok...great..i wil check and let u know....
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve only the Nth row from a table? santhakumar Database Support 6 11-14-2008 04:12 AM
How to Retrieve a Cookie Value? sundarraja PHP Programming 4 04-02-2008 06:00 AM
Stop Junk Mails srikumar_l Networking & Internet Connectivity 2 12-22-2007 01:13 PM
How to Store and Retrieve the values in server side caches in ASP.NET? oxygen ASP and ASP.NET Programming 1 07-23-2007 12:14 AM
simple windows service to generate automatic mails kingmaker C# Programming 0 07-15-2007 11:04 PM


All times are GMT -7. The time now is 08:01 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0