Click here to Skip to main content
15,893,622 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# use for Resource Intesive Backend Components Vs C++ Pin
Pete O'Hanlon17-Sep-07 2:14
mvePete O'Hanlon17-Sep-07 2:14 
QuestionChecking for new data in a xml file Pin
anu8117-Sep-07 1:47
anu8117-Sep-07 1:47 
Questionhow to us typed dataset in vb.net 2005 Pin
himanshu p taunk17-Sep-07 1:38
himanshu p taunk17-Sep-07 1:38 
QuestionHow to stop a windows service in Visual Studio 2003 Pin
Diego F.17-Sep-07 1:07
Diego F.17-Sep-07 1:07 
AnswerRe: How to stop a windows service in Visual Studio 2003 Pin
TimFoxell17-Sep-07 1:25
TimFoxell17-Sep-07 1:25 
QuestionA listview-like control for displaying log messages? Pin
Domenic Denicola17-Sep-07 0:17
Domenic Denicola17-Sep-07 0:17 
AnswerRe: A listview-like control for displaying log messages? Pin
Pete O'Hanlon17-Sep-07 1:42
mvePete O'Hanlon17-Sep-07 1:42 
Questionhow to get email address in microsoft exchange server? [modified] Pin
goldenchance17-Sep-07 0:02
goldenchance17-Sep-07 0:02 
Dear all,
I'm working with a Microsoft outlook add-in. There are 2 kinds of email item. One is normal email from the internet, called SMTP email. The other is from Exchange Server, called EX email.
I want to get the sender email address when user click on a email item.With the smtp email, I can get the sender email easily. I have a big problem when user click on EX email type, an email is from Exchange Server. The SenderEmailAddress is not as usual. It is like: mail.SenderEmailAddress = "/O=ABC ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=MYTESTING"

I found one way on internet for this problem, but it is not success when i applied.
<br />
public static string GetFromAddress(MailItem mail)<br />
{<br />
            MailItem objItem;<br />
            MAPI.Session objSession;<br />
            MAPI.Message objMsg;<br />
            MAPI.AddressEntry objSender;<br />
            String strAddress;<br />
            String strName;<br />
            String strEntryID;<br />
            objOutlook = GetApplication();<br />
            strName = mail.SenderName;<br />
            strEntryID = mail.EntryID;<br />
            objSession = new MAPI.Session();<br />
            object pobjMissing = System.Reflection.Missing.Value;<br />
            objSession.Logon("", "", pobjMissing, pobjMissing, pobjMissing, pobjMissing, mail.SenderEmailAddress);<br />
             objMsg = (MAPI.Message)objSession.GetMessage(strEntryID, false);<br />
            objSender = (MAPI.AddressEntry)objMsg.Sender;<br />
            strAddress = objSender.Address.ToString();<br />
            objSession.Logoff();<br />
            return strAddress;<br />
<br />
<br />
}<br />


Although I have tried for 2 days, I have no any good solutions.
Please give me a hand to solve this issue.
Thanks



-- modified at 6:10 Monday 17th September, 2007

Banana

AnswerRe: how to get email address in microsoft exchange server? Pin
Corinna John17-Sep-07 4:23
Corinna John17-Sep-07 4:23 
GeneralRe: how to get email address in microsoft exchange server? [modified] Pin
goldenchance17-Sep-07 15:50
goldenchance17-Sep-07 15:50 
GeneralRe: how to get email address in microsoft exchange server? Pin
Corinna John19-Sep-07 8:56
Corinna John19-Sep-07 8:56 
QuestionStop timer Pin
andredani16-Sep-07 23:56
andredani16-Sep-07 23:56 
AnswerRe: Stop timer Pin
Martin#17-Sep-07 0:11
Martin#17-Sep-07 0:11 
AnswerRe: Stop timer Pin
Giorgi Dalakishvili17-Sep-07 0:14
mentorGiorgi Dalakishvili17-Sep-07 0:14 
GeneralRe: Stop timer Pin
blackjack215017-Sep-07 1:10
blackjack215017-Sep-07 1:10 
QuestionDataGridView Pin
DeepOceans16-Sep-07 23:51
DeepOceans16-Sep-07 23:51 
AnswerRe: DataGridView Pin
Giorgi Dalakishvili17-Sep-07 0:15
mentorGiorgi Dalakishvili17-Sep-07 0:15 
AnswerRe: DataGridView Pin
Imran Khan Pathan17-Sep-07 2:00
Imran Khan Pathan17-Sep-07 2:00 
QuestionSearch GUI to configurate Log4Net! Pin
T-Bear198716-Sep-07 23:25
T-Bear198716-Sep-07 23:25 
QuestionIntractivity with ms word?? Pin
Muammar©16-Sep-07 22:59
Muammar©16-Sep-07 22:59 
AnswerRe: Intractivity with ms word?? Pin
Pete O'Hanlon16-Sep-07 23:20
mvePete O'Hanlon16-Sep-07 23:20 
GeneralRe: Intractivity with ms word?? Pin
Muammar©17-Sep-07 0:55
Muammar©17-Sep-07 0:55 
QuestionWriting into an unmanaged buffer and marshalling it Pin
Leonardo Pelisoli16-Sep-07 22:46
Leonardo Pelisoli16-Sep-07 22:46 
GeneralBump Pin
Leonardo Pelisoli19-Sep-07 11:59
Leonardo Pelisoli19-Sep-07 11:59 
AnswerRe: Writing into an unmanaged buffer and marshalling it Pin
Leonardo Pelisoli21-Sep-07 5:37
Leonardo Pelisoli21-Sep-07 5:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.