keepingbusy
Programmer
Hi all
We have an app that automatically sends confirmation emails when an order is processed. There have been no problems using this with Outlook 2007 in conjunction with ClickYesPro (which stops the "Someone is trying to send... message")
Today, we tried this out at another location where Outlook 2003 is the email software and get the following error message:
Seems strange that it works with a later version of Outlook but not with an earlier one.OLE IDispatch exception code 4096 from Microsoft Office Outlook: The operation failed....
Here is part of the code we use:
Code:
oOutlook = Createobject('Outlook.Application')
oNameSpace = oOutlook.getnamespace('MAPI')
oOutbox = oNameSpace.GetDefaultFolder(4)
oItems = oOutbox.Items
oMailItem = oItems.Add(0)
oMailItem.To = memail
oMailItem.Subject = "Our subject line here"
oMailItem.HTMLBody = EXTRA+"<HTML><BODY> ;
<br>Dear "+proper(mline01)+"</B> ;
<br><br>Many thanks for your order. ;
<br><br>Order id: <B>"+TRIM(mtransact)+"</B> ;
<br><br>Order details: <B>"+TRIM(mordtext)+"</B> ;
[b]edited....[/b]
<br><br>Many thanks ;
</BODY></HTML>"
oMailItem.Send
I would appreciate your guidance on this one.
Many thanks
Lee