Outlook Application wont send mails every second instance - email

I know I should probably ask MS about this, but I dont know if I trust their communication tools to get me a satisfying answer.
I have recently taken the task to test an application of mine.
Part of this test is to send an e-mail to it, then log in and see if I get the result I want (this is automated)
For this the process is:
Open Outlook -> Send Mail
Close Outlook
Open App -> Check result
Open Outlook -> Send Mail
Close Outlook
But for some reason, every second time the outlook app is opened, (including manually opening the app to check on configurations etc.) Mails will go to the outbox but will not be sent, unless I manually trigger them to.
Now, there are possible solutions like keeping the app running continously, or telling my testing-suite to press F9 after every sent mail, but I want to tackle the root cause, and fix the underlying problem.
The Outlook Version used is the latest Version of Office 365 Outlook.
Has anyone else had this experience and figured out a fix?
Thank you in advance.

Keep in mind that message submission is an asynchronous process, so if you close Outlook while it is still sending, the message might end up stuck in the Outbox.
You can call Namespace.SendAndReceive to force submission, but it is still asynchronous. You can hook into the SyncObject.SyncEnd event on the first (All Accounts) SyncObject from the Namespace.SyncObjects collection and quite only after that event fires.

Since this problem occured on a machine I do not own, I tried avoiding certain easy troubleshooting steps. After I couldnt find an answer on my own, and I didnt get responses here that would've helped me solve this without a wooden hammer method, I asked for permission to issue a repair to the local office 365 suite.
After the repair it had redownloaded and installed the entirety of office 365.
After connecting my company MS account to outlook, the issue no longer appeared.
I guess this counts as solving this issue.

Related

Powershell - Add mailbox account to Outlook

I have googled tons for this but with no success, maybe I just have the wrong approach?
Problem:
We work with migrating organizations from on premises Exchange to Office 365 and vice versa. As a service we also log in to all user computers and do the initial "add existing mailbox"-steps. Since we are using Autodiscovery-pointers this takes a lot of time. With a bad bandwidth it can take up to 15 min per user.
Our goal:
Create a Powershelscript where we can put the settings that normally being fetched by Autodiscovery and quickly add a new, existing mailbox to the computer so next time they log in they can just start the Outlook application and they are logged in.
I hope I made myself understandable, please ask if anything is unclear.
Thanks in advance!
Edit:
Maybe there is a way to go through the initial Outlook-setup via a PSSession? Then the time that an Autodiscovery takes wouldn't matter since we can do all the setups remote, unatended.

How to test MAPI Send Email errors

We have a program written in Delphi that can send emails via simple MAPI
for the people that use MAPI with outlook installed 95% of the time it works fine
but for the 5% of people that it doesn't just work for is there anyway to Test MAPIlooking for something where we can find if there is an issue with our program or if its something that their hardware guy needs to fix.Would be good if its some Microsoft tool or something official so if we go to the clients hardware/IT guy and say test this he will trust the results of the test
some errors we have come across include
api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.
Access violation only for one contact in the outlook address book - happened when calling the MAPIResolveName (no solution found for this - client didnt want to reinstall outlook)
Mapi error 26 for Office build version 1703 - first email goes through ok but they all fail after that. (You can make a work around by using the MapiLogOn and pass the session handle through in the MAPISendMail call)
Either there is no default mail client or the current mail client cannot fulfill the messaging request

Process mail bursts one at a time

we receive bursts of mails from our IDS that we are postprocessing to create incident reports, forward them to request tracker, etc. Right now, we have one script that does all the postprocessing that is called by procmail according to rules in /etc/aliases. Something like:
ids-report: "|/opt/ids/process.pl"
Now, the problem is that running many instances of this script because of mail bursts can lead to memory depletion and some synchronization nastyness.
In my script, I tried using Sys::RunAlone, but found it suboptimal.
I would like procmail to feed my script one mail from queue at a time, but I have not found a way to do it.
Do you guys have any idea, what could I do? Out-of-the-box solutions are welcomed too...
Thanks.
Why not save every mail to a file or database as soon as you receive them and process the saved records one at a time from another script ?
If you post some code you may receive more (and possibly better) answers :)
I second Georgi Rangelov's answer but if you are seriously asking how to run only one message at a time in Procmail, the answer is to use a lock file.
:0:only1.lock
| /opt/ids/process.pl
This means, if the file only1.lock exists, wait. Once it's gone, create it, run the pipe, and then remove the lock file when done.
See also http://porkmail.org/era/procmail/mini-faq.html#locking
"IMAP with idle" mailbox as buffer/pipeline of email messages
You may deliver messages to IMAP mailbox. You can use fetchmail with --idle (to get real time processing) and --mda (to execute your script).
You can make procmail deliver messages to maildir as use dovecot even without daemon running to allow fetchmail access maildir using IMAP protocol.
P.S. I may provide a few more details if you are interested. AFAIR I had used it to handle spams catched by my spamtrap server.

Open links from newly received emails automatically

is there are program or script or anything that will make my email client/webmail to open webpage links from newly received emails automatically?
If someone knows or can make a add-on for thunderbird or make this to work I don't mind paying. Just I need links that are in emails I receive to be automatically opened in default internet browser tabs.
All I can say is I very very much doubt it. If there ever was one created it would most probably be removed by most download source providers as there is a fairly huge security risk there.
Additionally, aside from the security factor you have a simple load factor to account for. I regularly make newsletters for clients, each with a link to a text version, a online version, a link for the logo and so forth... So if you did have such a plugin you would also open these links, which seams crazy. Additionally, remember the Unsubscribe link for emails, on some you are asked to confirm on others you click(/open), your taken off. Which would be very undesired.
I do understand you probably have a reason X for doing this, like because its a in house email system which creates reports and it does this and does that etc. I think most people here do understand there are sometimes very odd usage cases for things, but I don't think anyone will be able to assist you here, sorry!

Coldfusion 9, How do you Empty an "Undelivered Mail Queue"

I have roughly 9,000 undelivered messages in my mail spool in Coldfusion 9. As far as I can tell the only way to manage these messages is to manipulate them 10 at a time through the CF Admin GUI.
I'm looking for a way to expedite this process. I'd like to just clear the queue, or batch send them all.
Does anyone know how to do this?
Thank you,
-Dave
Go into the filesystem and move the files from cfusion/mail/undelivr to cfusion/mail/spool. Simple!
Take a look at Ray Camden's SpoolMail (http://spoolmail.riaforge.org/). This is a very handy plug-in that you can add to all your servers and at bulk move your emails to spool and resend them.
Someone sent me a snippet at some point that would try to reprocess the queue periodically at some point, but for the life of me, I can;t find it or see it on google. - sorry.
HOWEVER: the undeliverable queue is just a bunch of files, you can write yourself a little application that will try to reprocess the queue periodically and prune out the ones that have been in the undeliverable too long.
I am pretty sure that the spool only tries to deliver mail once
just move the files back into the spool directory to have the spooler "retry"
you would have to keep a file or DB to track what has been tried & how many times.
I would also send a notification on what has been deleted - or at least log it.
-sean
PS> 9000? what is your traffic like? I would suspect there is a problem if you have that many undeliverables....
You should write simple CF program for tracking and deleting for undelivered mails.
Use cfdirectory tag.
If you moved your mail server and the spool doesn't seem to ever empty out, you need to open up each .cfmail file and change the IP number. I moved my mail server as well, and when I brought it back up I had forgotten to change the IP setting for mail in CF Admin, and wound up with 21,000 emails in my spool by the next day. Ugh. I could have run a cf script on it to open up each one, change the IP number, and then move the file into the spool dir, but opted instead of downloading a free search and replace utility from download dot com. Worked like a charm. It took about twenty minutes to do the full s&r and then a few seconds to move them all over.
The file system is the simplest way.
To attempt to resend the emails, move the files in ~\ColdFusion2016\cfusion\Mail\Undelivr to ~\ColdFusion2016\cfusion\Mail\Spool.
If you just don't care about those email files then simply delete them.
I point my development mail server to point to nowhere (smtp.gmail.com.dontSend) so no mail goes out and they all just stack up in undelivered. That way the rest of my development team does not get all the errors I generate and catch through email. More importantly, no test emails accidentally go out to real accounts.
I go into the CF-Administrator to look at and manage my undelivered mail when testing but if/when it gets huge I just delete them from the file system.