login about faq

How to get email from pod51018.outlook.com port 995 with SSL in C#?

asked Nov 30 '12 at 11:13

ZQian's gravatar image

ZQian
1222


This problem should be approached in the same way as for any other mail service provider -- whether it be your ISP, yahoo.com, GMail, or any of the innumerable mail service providers on the Internet.

Step 1. Find the online documentation published by the mail service provider. In this case, go to Google and search for "outlook.com mail settings". Choose the search result at the provider's website. In this case, it's http://help.outlook.com/

Step 2. Read the information about the email settings: Get the server hostname for each protocol supported (POP3, IMAP, SMTP), the port numbers, SSL/TLS requirements (explicit, implicit, or none), etc.

Step 3. Set the corresponding Chilkat.MailMan (or Chilkat.Imap) properties to the values required by the mail service provider.

link

answered Dec 03 '12 at 08:55

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

I found one of the "Chilkat C# Examples" and ran the code in a console application. The bundle == null forever. I used correct uid/pwd/port/ssl, which work successfully with OpenPop.net. Please explain why and help.

// The mailman object is used for receiving (POP3) // and sending (SMTP) email. Chilkat.MailMan mailman = new Chilkat.MailMan();

// Any string argument automatically begins the 30-day trial. bool success; success = mailman.UnlockComponent("30-day trial"); if (success != true) { MessageBox.Show("Component unlock failed"); return; }

// Set the POP3 server's hostname mailman.MailHost = "pop.gmail.com";

// Set the POP3 login/password. mailman.PopUsername = "****@gmail.com"; mailman.PopPassword = "****";

// Indicate that we want TLS/SSL. Also, set the port to 995: mailman.MailPort = 995; mailman.PopSsl = true;

Chilkat.EmailBundle bundle = null; // Read mail headers and one line of the body. bundle = mailman.CopyMail();

if (bundle == null ) { MessageBox.Show(mailman.LastErrorText); return; }

int i; Chilkat.Email email = null; for (i = 0; i <= bundle.MessageCount - 1; i++) { email = bundle.GetEmail(i);

//  Display the From email address and the subject.
textBox1.Text += email.From + "\r\n";
textBox1.Text += email.Subject + "\r\n" + "\r\n";

}

link

answered Dec 03 '12 at 12:47

ZQian's gravatar image

ZQian
1222

I posted a follow-up question.

link

answered Dec 03 '12 at 12:48

ZQian's gravatar image

ZQian
1222

This line of code makes a difference when the key replaced "30-day trial":

success = mailman.UnlockComponent("30-day trial");

link

answered Dec 03 '12 at 13:44

ZQian's gravatar image

ZQian
1222

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1

Asked: Nov 30 '12 at 11:13

Seen: 2,042 times

Last updated: Dec 03 '12 at 13:44

Related questions

powered by OSQA