Delivery event fired but not starts

Discussion for developers using MailEnable.
Post Reply
robyone
Posts: 10
Joined: Mon Oct 06, 2014 2:18 pm

Delivery event fired but not starts

Post by robyone »

Hello
I have a computer with Windows Server 2016 and MailEnable Standard Management Version 10.23
In a postoffice, in a mailbox that works regularly, I set up a delivery event that points to a batch file which, by test, creates a text file for parameter 1, parameter 2 and parameter 3, so:
echo %1>parameter1.txt
echo %2>parameter2.txt
echo %3>parameter3.txt
Nothing else.
I gave write permissions to everyone to the folder where the batch file is located.
If I run it from the command line, it works regularly!

(at the beginning the batch file had to execute a vbs file with cscript, but since this did not happen, I simplified the batch file to the minimum to do a basic test)

Well, what's the problem ??? That when the mailbox receives an email, nothing happens! In reality the batch file is not executed because I cannot find any txt file!

In the postoffice debug log, on detail level 10, appears this line:

Mailbox (mail) on postoffice (xxxxxxx.it) executed a delivery event (C:\xxxx\xxxxx\redirect.bat xxxxx.it yyyyy zzzzzzzzzzzzzzzzzz.MAI

and no particular errors.

How is it possible? Do you have an answer? Thank you.

robyone
Posts: 10
Joined: Mon Oct 06, 2014 2:18 pm

Re: Delivery event fired but not starts

Post by robyone »

I solved by myself, for what I needed: in the input box of application to be executed for the delivery event, I entered:
cscript.exe "path to file\file.vbs"
Quotation marks are only needed if there are spaces in the path.
I did not understand why the bat file was not executed, but I need the vbs file to be executed.

Post Reply