|
-
Oct 20th, 2000, 02:28 PM
#1
Thread Starter
Addicted Member
Does anyone know how to determine when new email arrives? I want to be able to inform the user when new email arrives.
212 will lead you to the truth
-
Oct 20th, 2000, 03:16 PM
#2
Fanatic Member
Using Outlook?
I think you can do this using CDO (Collaboration Data Objects)...
But..
If it's outlook the user could change her own personal settings to broadcast a msg when a new e-mail comes in
provided of course that Outlook is up...
How would she be notified? Via another e-mail or via
the company's paging system automatically?
If it is via another e-mail, then it defeats the purpose
If she is doing something else while OUTLOOK is not on
for example while she is inside a VB prog...
then one crazy way... would be to set this option referred
to earlier... (that can be done programmatically [I guess])
then fire Outlook within the application.. as a secondary task and minimize it..
then if there is ny e-mail she would be notified....
Am I way off (from this question) is it a Friday afternoon?
All of this is to say
We need a little bit more clarification
Thanks
-
Oct 23rd, 2000, 10:46 AM
#3
Thread Starter
Addicted Member
Ok, If the user recieves an email, their inbox number increase by 1. I want to be able to detect when this number changes. Much like the way the little envelope appears in the taskbar, everytime a new message arrives. I've thought about tracking the inbox number and/or determines when the little flag appears. I really don't want to be limited to OUTLOOK. Does anyone know how to acheive this? This is coding I'm using to send emails:Private Sub Form_Load()
MAPISession1.SignOn
End Sub
Private Sub Form_Unload(Cancel As Integer)
MAPISession1.SignOff
End Sub
Private Sub SSCommand1_Click()
With MAPIMessages1
.MsgIndex = -1
.RecipDisplayName = txtAddressee1.Text
.MsgSubject = txtSubject.Text
.MsgNoteText = rtbMessage.Text
.SessionID = MAPISession1.SessionID
.Send
End With
txtMessageHistory.Text = DateNow
MsgBox "Message sent successfully!", vbOKOnly, "Mail Sent"
End Sub
Private Sub SSCommand2_Click()
frmContactProfile.Visible = True
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Winsock1.GetData Response ' Check for incoming response *IMPORTANT*
End Sub
212 will lead you to the truth
-
Oct 24th, 2000, 09:27 AM
#4
Thread Starter
Addicted Member
I thought this may be helpful. I found the coding to detect email. Use the coding I posted previously and modify it to include the following info:
Private Sub Form_Load()
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
End Sub
Private Sub SSCommand1_Click()
With MAPIMessages1
.MsgIndex = -1
.Compose
.RecipDisplayName = txtAddressee1.Text
.MsgSubject = txtSubject.Text
.MsgNoteText = rtbMessage.Text
.ResolveName
.SessionID = MAPISession1.SessionID
.Send False
End With
txtMessageHistory.Text = DateNow
MsgBox "Message sent successfully!", vbOKOnly, "Mail Sent"
End Sub
Private Sub lstInBox_DblClick()
MAPIMessages1.MsgIndex = lstInBox.ListIndex
MsgBox MAPIMessages1.MsgNoteText
End Sub
Private Sub SSCommand3_Click()
MAPIMessages1.Fetch
lstInBox.Clear
For i = 0 To MAPIMessages1.MsgCount - 1
MAPIMessages1.MsgIndex = i
lstInBox.AddItem MAPIMessages1.MsgSubject
Next i
End Sub
212 will lead you to the truth
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|