Free Support Forum - aspose.com

How to get Sender email addres for a MailMessage object for outlook2007


#1

Hi sir,

        I try to get the sender email address for our purpose using mail message.

strong text
I try this code

       Dim mailMsg1 As Aspose.Email.MailMessage = Aspose.Email.MailMessage.Load(fname)

strsendername = Convert.ToString(mailMsg1.From)

this code work in 2013
but for 2007 not work sender email address not display

Note : I need reply urgent customer is waiting pls reply ASPA


#2

@senthilnathan,

I have observed the issue shared by you. As far as API is concerned there is same namespace used for Outlook 2007 or onward. I request you to please provide the source file along with used sample code that we may test on our end to help you further.


#3

hi mudassir.fayyaz,

i Use sample

dim pathreg as string =“C:\Program Files (x86)\Office Assistant Add-in”

          If Directory.Exists(pathreg + "TempAddin\Outlook") Then

                Dim Dirs6() As String = Directory.GetDirectories(pathreg + "TempAddin\Outlook")

                For Each Dirs1 In Dirs6
                    Dim dinfo22 As New DirectoryInfo(Dirs1)
                    For Each finfo As FileInfo In dinfo22.GetFiles
                        fname = finfo.FullName
                        Dim mailMsg1 As Aspose.Email.MailMessage = Aspose.Email.MailMessage.Load(fname)
                        asdsd = mailMsg1.From.User

                        strsendername = Convert.ToString(asdsd)
                    Next
                Next
            End If
            MsgBox(asdsd)
            MsgBox(strsendername)

I uppload the sample msg fileasas.zip (3.1 KB)


#4

hi mudassir.fayyaz,

 This one is correct one u check this <a class="attachment" href="/uploads/discourse_instance3/23483">sas.zip</a> (3.4 KB)<a class="attachment" href="/uploads/discourse_instance3/23483">sas.zip</a> (3.4 KB)

sample1.zip (2.7 MB)


#5

@senthilnathan,

Thank you for sharing the information. An issue with ID EMAILNET-39283 has been created in our issue tracking system to further investigate the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.


#6

@senthilnathan,

We have investigated the issue on our end. Actually, Outlook 2007 creates not sended MSG file without any information about sender(properties PR_SENDER_EMAIL_ADDRESS or PR_SENT_REPRESENTING_EMAIL_ADDRESS can be found by MFCMAPI or OutlookSpy). So, Aspose.Email can not provide such information.

Please see attached file:
test 2007.zip (10.5 KB)