Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mapi error
Message
 
 
À
15/03/2007 10:38:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
01203958
Message ID:
01203972
Vues:
20
Worked fine for me except for the Outlook Security message.

May be your Outlook is not properly configured?

BTW, was it your address? If yes, you should get my e-mail.

>
>Try
>   loWSH       = Createobject("wscript.shell")
>   cProfile    = loWSH.RegRead([HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\DefaultProfile])
>   loWSH       = Null
>Catch to oException
>   oException  = Null
>Endtry
>
>oSession = CreateObject([MAPI.Session])
>oSession.Logon(cProfile)
>
>NEW = oSession.OUTBOX.Messages.Add                        && Create a new message.
>NEW.SUBJECT = "Test Mail with OLE Messaging"              && Add a message subject.
>NEW.Text = "Mail System Test" + Chr(13) + "using OLE!"    && Actual message text.
>
>SENDTO = NEW.RECIPIENTS.Add                               && Add a recipient object
>SENDTO.Name="pp@webhiker.dk"                              && Email address to mail message to
>SENDTO.Type=1                                             && 1= "TO:"; 2="CC:"; 3="BCC:"
>
>NEW.Update                                                && Required to save changes to a message object.
>NEW.Send(1,0,0)                                           && Parameter 1 = save copy in "Sent Mail" folder.
>oSession.LOGOFF                                           && Release the MAPI object.
>
>
>
>Now, all works well, the message gets saved - except the .Send method throws an exception.
>
>Here is the error message
>
>Error       : 1429
>Message     : OLE IDispatch exception code 17389 from Collaboration Data Objects: [Collaboration Data Objects - [E_FAIL(80004005)]]..
>
>
>I've looked on the internet, but found nothing that would indicate a reason for this particular error.
>
>TIA
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform