Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. pop3 mail

pop3 mail

Scheduled Pinned Locked Moved ASP.NET
helpsysadmintestingbeta-testing
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sudharsong
    wrote on last edited by
    #1

    hi im developing a mail application.im able to send mail through smtp mail .but my requirement is i have to receive mails thro pop3 .i did that thro this code try { // You will need to set these to your settings. // The settings here are settings for a local // demo POP3 server // that I use for testing. string xHost = "127.0.0.1"; string xUsername = "chad"; string xPassword = "pass"; using (POP3 xPOP3 = new POP3()) { xPOP3.Username = xUsername; xPOP3.Password = xPassword; xPOP3.Connect(xHost); int xCount = xPOP3.CheckMessages(); if (xCount == 0) { Console.WriteLine("No messages on account."); } else { Message xMsg = new Message(); xPOP3.Retrieve(1, xMsg); Console.WriteLine("Subject: " + xMsg.Subject); Console.WriteLine("From: " + xMsg.From.Text); Console.WriteLine("To: " + xMsg.Recipients[0].Text); Console.WriteLine(); Console.WriteLine(xMsg.Body.Text); } try { } finally { xPOP3.Disconnect(); } } } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine(""); Console.WriteLine("Press enter"); Console.ReadLine(); but i edited the attributes according to the req but im geting an error like reference is not their for POP3 class .im using system.web.mail name space please help with this. hi to all with regards, susa

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups