Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: "Outlook.Application" sendUsingAccount Date: Fri, 15 Dec 2017 05:24:40 +0100 Lines: 87 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: individual.net EFHtR6eepka7jTAsxiUl7w/+LG4bNEqnsAXQPSgZWqFRBCo/Y= Cancel-Lock: sha1:a5L2W2jTDE3SY2qeUoR85hmGC2g= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:11241 Hi Jamal, you are right. If you need to send emails using another than the default Exchange account, you need to start Outlook using another profile with the correct account as only one. This issue has costed me more than an entire day... And it is also confirmed by the author of the excellent Redemption library. Wolfgang Jamal wrote: > Hi Wolfgang, > > >> unfortunately SendUsingAccount does not work when you have Exchange > > > accounts. << > > In my case Outlook refuses to use anything other than the "primary" > Exchange account in Outlook. > I have 3 three exchange Microsoft accounts and some IMAP Gmail > accounts in Outlook. If try a Gmail account, it does not work. > So, the SendUsingAccount is not reliable and I prefer to use a third > part email library which does not rely on Outlook. > > I am posting this, so others are aware of this scenario. > > Jamal > > "Wolfgang Riedmann" wrote in message > news:f97lf6Fug3hU1@mid.individual.net... > > Ciao Alessandro, > > unfortunately SendUsingAccount does not work when you have Exchange > accounts. > > But it should work with POP-Accounts. > > You have to pass the account by reference: > > oMail:sendUsingAccount: = @oAccount > > Wolfgang > > > > Alessandro Vacchiano wrote: > > > Hi to all, > > > > i need to send email by Outlook and send it by selecting an Account. > > This code reads all accounts from my outlook: > > > > oOutlook: OLEAutoObject = {"Outlook.Application"} > > oAccounts: = oOutlook: Session: Accounts > > > > for i: = 1 upto oAccounts: Count > > oAccount: = oAccounts: item (s) > > > > ? oAccount: Displayname > > next > > > > > > Now when i send an eMail i need to send with one of this but i got > > an OLE Error. > > > > oAccounts: = oOutlook: Session: Accounts > > oAccount: = oAccounts: item (3) > > > > > > .. i prepare the email then: > > > > oMail: sendUsingAccount: = oAccount > > > > oMail: Send () > > > > sendUsingAccount not work i get error, some suggestion? > > > > Thanks a lot > > > > Alessandro --