473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

logging in to outlook programatically

I am using the code below to logon to the local Outlook account. But
what I need to do is be able to login without explicitly stating the
userlogin and password. Is it possible to pass the windows
authentication details to the logon method and it will automatically
logon to Outlook, without explicitly stating them (i.e. by passing
something along the lines of System.Environment.UserName and
System.Environment.Password)?

Outlook.Application oApp = new Outlook.Application();

//Get MAPI namespace
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");
oNS.Logon("username, "password", false, true);
*** Sent via Developersdex http://www.developersdex.com ***
Mar 13 '07 #1
1 1812
On Mar 13, 10:09 am, Mike P <mike.p...@gmail.comwrote:
I am using the code below to logon to the local Outlook account. But
what I need to do is be able to login without explicitly stating the
userlogin and password. Is it possible to pass the windows
authentication details to the logon method and it will automatically
logon to Outlook, without explicitly stating them (i.e. by passing
something along the lines of System.Environment.UserName and
System.Environment.Password)?

Outlook.Application oApp = new Outlook.Application();

//Get MAPI namespace
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");

oNS.Logon("username, "password", false, true);

*** Sent via Developersdexhttp://www.developersdex.com***
try this

System.Security.Principal.WindowsIdentity.GetCurre nt().Name
-
shashank kadge

Mar 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: batham | last post by:
Hello Gurus, Can someone direct me to the right path. Using C# to create a web service, how can I programatically log in a web site (with a valid username and password) and navigate to a...
3
by: bobdydd | last post by:
Hi All Is there a way that I could programatically check to see if Microsoft Outlook is installed on the PC. Someone suggested this code, below, but it is version specific. Dim appOutlook as...
16
by: Einar Høst | last post by:
Hi, I'm getting into the Trace-functionality in .NET, using it to provide some much-needed logging across dlls in the project we're working on. However, being a newbie, I'm wondering if some...
0
by: saurabhaggarwal | last post by:
Hi Suppose there is backend that stores all the appointments that are currently there in outlook. The job of my plugin is to add all the appointments that are there in outlook back to the...
2
by: Dhans | last post by:
I am new to Outlook programming. I want to access outlook from my C# application and get the information such as contacts, mails, appointments etc I can able to connect to outlook using...
5
by: Imry | last post by:
Is there a way to programatically add items to the outlook task list using VB ..net?
4
by: Alia Khouri | last post by:
I've been struggling with the logging module in the stdlib which seems to me rather counter-intuitive: For some reason it refuses to recognize configuration options when they are set inside a...
1
by: twhitehouse | last post by:
I have an error when trying to log into outlook accounts in my vb6 program. I do not have a problem logging into these same accounts using outlook 2003. I have googled and found most of the...
0
by: brossyg | last post by:
I have some VBA code that creates an email in Access and sends it from Outlook. It is based on a query with a list of email addresses. It sends the first email to Outlook and then I have to manually...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.