Delphi JvMail + Outlook 2013 - Error when Outlook is not closed - delphi

I'm using JvMail component to send e-mails by outlook in my application.
When sending e-mails by outlook 2013 and the outlook is closed, the new e-mail window opens normally, but when JvMail tries to send e-mail while outlook 2013 is running, I get the error: MAPI Error: (2) General MAPI Failure.
I'm using windows 8 and outlook 2013. I have tested this situation with outlook 2007 and Windows XP and works fine with the outlook 2007 open or closed.
How can I fix this? I'm working with Delphi XE3.
Obs:
There is no need to post my code, because the error happens even if I create JvMail and call JvMail.SendMail(True).

After some time without seeing this, I have figured out that the problem only happens when I try to open outlook with the Delphi opened.
If I use the JvMail to open outlook when executing my application without being by delphi, the problem doesn't happen.
I have also tested trying to open outlook using report builder, Indy and JvMail. All of them don't open outlook when running my application by delphi but they work perfectly when running my application directly by the exe file.

Related

How to open URL to open the external email sending app from TWebBrowser in FireMonkey mobile application

I'm using Delphi 10.1 Berlin for developing a mobile application for iOS and Android which has the TWebBrowser component. In this, I have loaded a webpage with this code in it:
www.google.com
sample#gmail.com
When the first label is clicked, the link is opening inside the TWebBrowser itself. As per my requirements, it should open in an external browser instead.
When the second label is clicked, the external email sending app is not opening.
Please help me resolve this issue.
Do I need to add anything in the webpage, or do I need to add anything to the Delphi code?

WinForms Application won't connect after QB 2014 upgrade

I support a legacy WinForms C# application that connects to 2 QuickBooks files. It has worked very well for years, both with QuickBooks 2008 and QuickBooks 2011.
A few days ago, the client upgraded to QuickBooks 2014. The application has not sucessfully connected to the QuickBooks files since. When I run the application manually it throws a .NET error saying System.Runtime.InteropServices.COMException (0x80040408): Could not start Quickbooks.
I decided to test to make sure that the SDK I am using, version 8.0, could in fact connect to QB 2014. So, I ran the SDKTestPlus3 application. When I tried to connect to the company file, it tells me that the application is not authorized to connect to that company file. So, I opened the company file in QB and went into Single User mode, and tried again - expecting to get the pop-up asking me to grant that application the right to connect. Instead, when I tried to connect with the file open in QB in Single User mode, SDKTestPlus3 gave an error saying "A QuickBooks company data file is already open and it is different from the one requested or there are multiple company files open."
Can anyone point me in the right direction here. Is the QBFC8 compatible with QB 2014, and if so is there something I need to do to get this application that has been working with QB 2011 for so long to continue working with QB 2014?
TIA!
Additional Information
I have now noticed that the errors in connecting to QhickBooks seem to be intermittent. The WinForms application gets run by a windows scheduled task every morning at 1:00 AM. Since the upgrade to 2014 on Monday, it has failed Tuesday, Wednesday and Thursday mornings. In looking at today's log files - this morning it successfully connected and processed records in QB. Now, when I try to run it manually, instead of the (0x80040408): Could not start Quickbooks COM error I instead got COM error (0x8004041C): An internal QuickBooks error occured while trying to access the QuickBooks company data file.
Has anyone else experienced these types of problems or have any idea what may be causing them? I need this application to work consistantly as it has in the past!!
Make sure the option to Keep QuickBooks running is unchecked.
Close all QB files that are open and make sure there are no other QBW32.exe files running in the task manager. If there are, kill them.
Try connecting again.
QuickBooks can be picky about who is doing what. Even better, though I'm sure there's some set of logical conditions that make it 100% replicable, it complains about user access seemingly randomly.
Make sure your legacy WinForms application and QuickBooks itself were installed and are running under the same user account.
Another option is altering the UAC settings.
technet on UAC: https://technet.microsoft.com/en-us/library/cc709691%28v=ws.10%29.aspx
intuit on UAC and your presenting error code: http://support.quickbooks.intuit.com/support/articles/SLN40414
Ignore that bit ^^^.
There's an error in QuickBooks Pro 2014. I've encountered it running in unattended mode with your connections and sessions going back and forth between company files.
After a few back and forths, something happens in their code and when you .EndSession/.CloseConnection the QuickBooks exe doesn't shut down. Then when you try to open your next connection, the exception bubbles up and you get the InterOp exception.
What I ended up having to do was after closing the connection, waiting like half a second and then, if QB32 is running, killing it. It's a crummy fix, but I didn't have a choice, and it works.
// closeConnection is from Intuit's SessionManager.cs that gets installed with the SDK
private void closeConnection(bool logError)
{
try
{
endSession(true);
if (_bConnOpen)
{
_sessionMgr.CloseConnection();
System.Threading.Thread.Sleep(waitTime);
KillQB32W();
_queryResponse = null;
_bConnOpen = false;
}
}
catch (Exception e)
{
if (logError)
logger.logCritical("SessionManager.CloseConnection", e.Message);
throw;
}
}
private void KillQB32W()
{
System.Diagnostics.Process[] oProcess = System.Diagnostics.Process.GetProcessesByName("QBW32");
foreach (System.Diagnostics.Process q in oProcess)
{
if (!q.HasExited)
{
q.Kill();
System.Diagnostics.Debug.WriteLine("Killer");
}
}
}

Print Through Terminal Service In vb6 application

i`ve facing a problem with terminal services in my vb6 application.
My program can print reports with Printer.print in remote printers \\ip\printer. But when i try to print some report in my application, i receive a error message 'printer error 482'.
I don`t know what can i do to solve this issue...
any idea?
Probably you don't have a printer installed from at specific user profile.
In the user profile, add a printter and its driver in the control panel / printers.

How do I get a desktop notification from a web app?

I need to create a web app for a client, and one of the requirements is whenever an event is triggered there should be some desktop notification in Windows XP/7 that tells them of the event. Similar to the balloon that pops-up when a new file is added to a folder in Dropbox.
I am using Rails for the web app, but have never done any desktop development. What should I be looking at?
Would this: Growl Notifications from a Web Server
plus Growl for windows meet your needs? http://www.growlforwindows.com/gfw/developers.aspx
It may be worth looking at Noti.
This tool allows web apps to push notifications to a small app running on OS X, Windows and Linux.
Would RSS-enabling the application, coupled with a RSS widget on the desktop, suffice? This has a few drawbacks - for example, it requires setup on the workstations and is not immediate. But it is non-proprietary.
If this is a Windows environment, perhaps the application could use the Windows command msg.exe to pop up an alert box (assuming Windows messenger service is enabled on the workstations).
You can use Telegram (desktop portable version included) with TeleNotify gem. Downside is, your app must have HTTPS. But with CloudFlare you can get your app working with SSL for free, even without changing your source code.

Blackberry ESS standalone mode & Outlook 2007

I launch Blackberry ESS in standalone mode. However I don't have Outlook Express on my computer. Instead I have Outlook 2007 on my computer. I set up an email account in Outlook 2007 which uses 'localhost' as its pop3/smtp server. The port numbers I used are the same as those in http://www.blackberryforums.com/developer-forum/5590-sending-receiving-email-device-simulator.html. However I got the following exception. 'UnknownHostException:pop3.server'. I am wondering if Outlook 2007 works with ESS.
I found the cause of the issue. I forgot to fill the following fields.
Name
The name to display in outgoing messages from the device simulator
Email
The email address to display in outgoing messages from the device simulator
But it is quite weird that the error message is UnknowHostException.

Resources