How did you set the EXE to have complete access?  It's really more of an
issue of the service/process that launches it having proper permissions...

Darin.


----- Original Message ----- 
From: "The Site Doctor" <[EMAIL PROTECTED]>
To: <IMail_Forum@list.ipswitch.com>
Sent: Tuesday, May 10, 2005 3:13 PM
Subject: RE: [IMail Forum] Program Alias


Hi Darin,

START just runs an EXE and if you run the batch file it runs as expected.
Yep I've also tried calling the file straight from iMail and have the same
response. I expect it's a setting I've missed...

I've set the EXE file to have complete access so it shouldn't be an access
problem I don't think. Where can I delete these files from? I didn't realise
they would hang around long, I'll add a delete routine at the end of the EXE
once its working haha

Thanks again for your help so far to you all.

Tim

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Darin Cox
Sent: 10 May 2005 20:00
To: IMail_Forum@list.ipswitch.com
Subject: Re: [IMail Forum] Program Alias

Hmmm...haven't used START before... have you tried it without?

Also, is your SMTP service running under LocalSystem or another ID?  If it's
system, then I would think you just need to make sure the SYSTEM account has
RWXD permissions on the file/directory you're executing & creating, though
it's possible there may be an issue with permissions on the registry keys as
well.

You also will want to delete the TMP file that's passed to your batch file,
script, or program to keep them from piling up in the spool dir.

Darin.


----- Original Message ----- 
From: "The Site Doctor" <[EMAIL PROTECTED]>
To: <IMail_Forum@list.ipswitch.com>
Sent: Tuesday, May 10, 2005 2:35 PM
Subject: RE: [IMail Forum] Program Alias


Hi Darin,

Thanks that's what I started doing, this is what I have atm:

[EMAIL PROTECTED] -alias that forwards onto:
[EMAIL PROTECTED] -real inbox to insure that the email is received
[EMAIL PROTECTED] -program alias to bluebird.bat
[EMAIL PROTECTED] -program alias to redbird.bat

bluebird.bat:
COPY %1 d:\bluebird.txt

redbird.bat:
START d:\SupportTicketer.exe %1

SupportTicketer.exe:
static void Main(string[] args)
{
FileInfo t = new FileInfo("redbird.txt");
StreamWriter Tex = t.CreateText();

Tex.WriteLine("I am running");
Tex.Write(Tex.NewLine);
Tex.Close();
}

When an email is received in [EMAIL PROTECTED] bluebird.txt appears without a
problem so I know the email has been received/parsed but redbird.txt never
appears.

I have also tried setting [EMAIL PROTECTED] to run d:\SupportTicketer.exe
which then just saves whatever params are sent to it and the line "I am
running" at the end to ensure it has been run -so with or without params
something will be in the text file but this text file never appears:

static void Main(string[] args)
{
FileInfo t = new FileInfo("redbird.txt");
StreamWriter Tex = t.CreateText();

for (int i=0; i < args.Length; i++)
{
StreamReader Red = File.OpenText(args[i]);
Tex.Write(Red.ReadToEnd());

Tex.WriteLine("Arg[{0}] = [{1}]", i, args[i]);
}
Tex.WriteLine("I am running");
Tex.Write(Tex.NewLine);
Tex.Close();
}

This is really bizarre, perhaps it's a file permissions issue like Bruce
suggested but I cant spot the difference here...

Tim

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Darin Cox
Sent: 10 May 2005 19:21
To: IMail_Forum@list.ipswitch.com
Subject: Re: [IMail Forum] Program Alias

Why don't you start with a simple batch file to see if it works on your
system.  If that works, then you can try calling the EXE from the batch
file, slowly migrating to just using the EXE.

I haven't called an EXE directly, but I have several batch and VBS scripts
in use to respond to emailed events.

Darin.


----- Original Message ----- 
From: "The Site Doctor" <[EMAIL PROTECTED]>
To: <IMail_Forum@list.ipswitch.com>
Sent: Tuesday, May 10, 2005 1:55 PM
Subject: RE: [IMail Forum] Program Alias


Hi Rick,

Thanks for your response, that was the idea, but I wanted to start by seeing
if I could get the exe to run as the parameter test I wrote didn't work.

It was a simple piece of code that took all the parameters and save them to
the file but again no file was created, here's the code:

static void Main(string[] args)
{
FileInfo t = new FileInfo("redbird.txt");
StreamWriter Tex = t.CreateText();

for (int i=0; i < args.Length; i++)
{
StreamReader Red = File.OpenText(args[i]);
Tex.Write(Red.ReadToEnd());

Tex.WriteLine("Arg[{0}] = [{1}]", i, args[i]);
}
Tex.Close();
}

Would be interested in your views.

Tim

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rick Davidson
Sent: 10 May 2005 18:16
To: IMail_Forum@list.ipswitch.com
Subject: Re: [IMail Forum] Program Alias

When a program alias recieves the message it creates a temp file that can be

parsed, have your executable read the body and copy it to a text file. We
parse the body for commands and perform actions based on those commands


Rick Davidson
National Systems Manager
North American Title Group
-
----- Original Message ----- 
From: "The Site Doctor" <[EMAIL PROTECTED]>
To: <IMail_Forum@list.ipswitch.com>
Sent: Tuesday, May 10, 2005 1:00 PM
Subject: [IMail Forum] Program Alias


> Hi,
>
> Today I've been trying to use the Program Alias facility in iMail for now
> to
> simply store the email as a text file (as outlined in the KB article:
> http://support.ipswitch.com/kb/IM-19980116-DD11.htm). This works fine but
> I
> want to extend it further now.
>
> So, I've written a little EXE which simply creates a TXT file, when
> running
> this text file on the server it runs fine and creates the text file but
> nothing happens when being called by iMail, iMail doesn't even touch, so I
> thought it was because it wasn't in a batch file, so I wrote a batch file
> which simply calls this exe (START d:\SupportTicketer.exe %1). Again when
> running it from the server its fine but nothing happens from the email
> account.
>
> Has anyone managed to get the program alias to work further than a batch
> file and if so could they give me a few pointers, I would like to log the
> email to a text file for now :)
>
> Cheers.
>
> Tim
>
> BTW my C# code is:
>
> static void Main(string[] args)
> {
> FileInfo t = new FileInfo("redbird.txt");
> StreamWriter Tex = t.CreateText();
> Tex.WriteLine("I am running");
> Tex.Write(Tex.NewLine);
> Tex.Close();
> }
>
>
> To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
> List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
> Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
>
>



To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to