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.
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.