Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I got a mailbox Application@mycompany.com from my office that will receive emails from various customers. My application (deployed in windows server) will read all emails and save attachments.

Do I need to configure outlook in windows server?

What I have tried:

Saw references in google but username & password is not being used. Looking for code which will read email in server.
Posted
Updated 2-Jun-21 22:35pm

Quote:
Do I need to configure outlook in windows server?
Only if you want to use it to read the emails. If you are doing it straight from code then your program needs to talk direct to the mail server. Google finds many samples that explain what you need to do: python read mail - Google Search[^]
 
Share this answer
 
 
Share this answer
 
Comments
RAHUL(10217975) 3-Jun-21 13:21pm    
Thanks for the suggestion, I tried this with below code:

client.Connect("outlook.office365.com", 993, true);
client.Authenticate("commonmailbox@mycompany.com", "mypass");

It throws Login failed exception. I am using https://outlook.office.com/mail/inbox
And I could see ouath2 being called so no sure whether we have any API's that will
authenticate my account
Richard Deeming 4-Jun-21 4:12am    
You have to use the SaslMechanismOAuth2 to authenticate. There's a discussion on how in the GitHub issues:
Office365 IMAP/POP basic auth retirement October 2020 · Issue #989 · jstedfast/MailKit · GitHub[^]

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