Shoutbox

finding contacts' emails - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: finding contacts' emails (/showthread.php?tid=43918)

finding contacts' emails by Stuffed on 04-30-2005 at 08:47 PM

hi

i've already played a bit with the plugin sample given by patchou,  but still, there are things i can't figure out.

i'm looking for a way, in the ReceiveNotify event, to obtain both the user e-mail, and the e-mail of the contact that sent the message.

it looks like the sContactName provide the friendly name of the contact, but it doesn't give me his e-mail.

btw, i can't use the (!M) and (!MP) since VB wouldn't understand them.

oh, yeah, i forgot, i'm using VB :). thx for the help.


RE: finding contacts' emails by Dempsey on 04-30-2005 at 08:48 PM

you can get the email address of all users in the conversation using the Messenger API.

You can use the oMessenger object sent in the Initalise event.

let me know if you want some code to help, I have it somewhere


RE: finding contacts' emails by Stuffed on 04-30-2005 at 08:57 PM

yeah, a piece of code would be welcome :). thx


RE: finding contacts' emails by Dempsey on 04-30-2005 at 09:03 PM

At the top of your class module:

code:
Private WithEvents MSN As MessengerAPI.Messenger

In Initalise event:
code:
Set MSN = New oMessenger

At bottom of class module:
code:
Private Sub MSN_OnIMWindowCreated(ByVal pIMWindow As Object)
    Dim MSNCont As IMessengerContact
    Dim MSNConvo As IMessengerConversationWnd
    Set MSNConvo = pIMWindow
    For Each MSNCont In MSNConvo.Contacts
        MsgBox "Friendly Name: " & MSNCont.FriendlyName & vbCrLf & vbCrLf & "Signin Name: " & MSNCont.SigninName
    Next
End Sub

RE: finding contacts' emails by Stuffed on 04-30-2005 at 09:13 PM

thx man. :)

on last thing... what should i do to know who of all the e-mails is the user? should i make a variable which takes the content of sUserEmail in the Initialize function? or is there a more simple way?


RE: finding contacts' emails by Dempsey on 04-30-2005 at 09:15 PM

hmm i just the code and it only returns the other people in the conversation, not yourself, so you'll have to use sUserEmail to get yor own email.


RE: finding contacts' emails by Stuffed on 04-30-2005 at 09:29 PM

ok, thanks a lot :)


RE: finding contacts' emails by Dempsey on 04-30-2005 at 09:38 PM

np :)

If you need anymore help with the plugin let us know


RE: finding contacts' emails by RaceProUK on 05-01-2005 at 12:15 PM

quote:
Originally posted by Stuffed
i'm looking for a way, in the ReceiveNotify event, to obtain both the user e-mail, and the e-mail of the contact that sent the message.
There should be an Object argument in ReceiveNotify: this is the interface to the conversation window IIRC. I do my development in C++, so I'm a little rusty in my VB.