Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 18013
Number of posts: 55386

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How to check whether email has already been sent? Posted by pasa on 8 Feb 2007 at 3:11 PM
This message was edited by pasa at 2007-2-9 3:36:35

Hi everyone,
I have try to send a email from my VB project. Email was sent well, I know about it because I check my mailbox, where my program sent email to; but I dont know how to check whether my currently email has already been sent to another mailbox (for ex: mail box of my friend) or not?
So please help me to solve this prob. Thx in advance.

MAPIMessages1.msgsent always returns FALSE!?

This is my code:

    'Sign in
    MAPISession1.DownLoadMail = False
    MAPISession1.LogonUI = False
    MAPISession1.SignOn
    MAPIMessages1.MsgIndex = -1
    MAPIMessages1.SessionID = MAPISession1.SessionID
    
    'Compose email
    MAPIMessages1.Compose
    MAPIMessages1.RecipDisplayName = EmailAdress
    MAPIMessages1.MsgSubject = "Example"
    MAPIMessages1.MsgNoteText = "Don't delete this file please"
    MAPIMessages1.AttachmentPathName = ("C:\test.txt")
    MAPIMessages1.ResolveName
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    'For testing
    MsgBox (MAPIMessages1.MsgSent) 'false - I think it's correct
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    MAPIMessages1.Send

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    'For testing
    MsgBox (MAPIMessages1.MsgSent) 'Always be FALSE ?? WHY?
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    MAPISession1.SignOff

    MsgBox (MAPIMessages1.MsgSent) 'FALSE too!!?????



Report
Please people, help me! Posted by pasa on 9 Feb 2007 at 2:08 AM
: Hi everyone,
: I have try to send a email from my VB project. Email was sent well, I know about it because I check my mailbox, where my program sent email to; but I dont know how to check whether my currently email has already been sent to another mailbox (for ex: mail box of my friend) or not?
: So please help me to solve this prob. Thx in advance.
:
: This is my code:
:
:
:     'Sign in
:     MAPISession1.DownLoadMail = False
:     MAPISession1.LogonUI = False
:     MAPISession1.SignOn
:     MAPIMessages1.MsgIndex = -1
:     MAPIMessages1.SessionID = MAPISession1.SessionID
:     
:     'Compose email
:     MAPIMessages1.Compose
:     MAPIMessages1.RecipDisplayName = EmailAdress
:     MAPIMessages1.MsgSubject = "Example"
:     MAPIMessages1.MsgNoteText = "Don't delete this file please"
:     MAPIMessages1.AttachmentPathName = ("C:\test.txt")
:     MAPIMessages1.ResolveName
:     ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
:     'For testing
:     MsgBox (MAPIMessages1.MsgSent) 'false - I think it's correct
:     ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
: 
:     MAPIMessages1.Send
: 
:     ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
:     'For testing
:     MsgBox (MAPIMessages1.MsgSent) 'Always be FALSE ?? WHY?
:     ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
:     MAPISession1.SignOff
: 
:     MsgBox (MAPIMessages1.MsgSent) 'FALSE too!!?????
: 

:




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.