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: <[email protected]>
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: [email protected]
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: <[email protected]>
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/

Reply via email to