SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Mail Send issues

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Mail Send issues
Author Message
Eric Davis



Joined: 31 Jan 2005
Posts: 54

Post Mail Send issues Reply with quote

My current setup has me sending plain text emails via SMTP..

99% of my messages are simple mailsends with the message argument consisting of a variable.

I have run into trouble before where the variable was null, and the send failing, so i have assured that no matter what.. the 'message' variable always has a value
ie : concatex "Error ",message,message

In recent days, at random times, ALL my mail sends are failing with the message "Could not open temporary file.". I can see that this creates a oprpahn file in the temp directory of the server, usually just requireing me to clear it out and retry the job.

But recently, NOTHING works to resolve this.. at different points in the day, a job will fail a mailsend with this errror, and all mailsends from that point forward will fail. I have completely removed all 24x7 fles from the server, and installed clean... which worked from 3am until only 5pm today.

using the SAME job database on a second server (in fact, the slave 24x7 server) shows no problems.

Email notification is a VERY big part of out jobs.. I would rather not reinstall windows on this server (2000 vs 2003 reinstall) .. Do you have any ideas? How does 24x7 relate to temp files during SMTP sends ?

Tue Mar 21, 2006 8:30 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7963

Post Re: Mail Send issues Reply with quote

Please ensure all jobs are set to run detached.

: My current setup has me sending plain text emails via SMTP..

: 99% of my messages are simple mailsends with the message argument consisting
: of a variable.

: I have run into trouble before where the variable was null, and the send
: failing, so i have assured that no matter what.. the 'message' variable
: always has a value
: ie : concatex "Error ",message,message

: In recent days, at random times, ALL my mail sends are failing with the
: message "Could not open temporary file.". I can see that this
: creates a oprpahn file in the temp directory of the server, usually just
: requireing me to clear it out and retry the job.

: But recently, NOTHING works to resolve this.. at different points in the day,
: a job will fail a mailsend with this errror, and all mailsends from that
: point forward will fail. I have completely removed all 24x7 fles from the
: server, and installed clean... which worked from 3am until only 5pm today.

: using the SAME job database on a second server (in fact, the slave 24x7
: server) shows no problems.

: Email notification is a VERY big part of out jobs.. I would rather not
: reinstall windows on this server (2000 vs 2003 reinstall) .. Do you have
: any ideas? How does 24x7 relate to temp files during SMTP sends ?

Tue Mar 21, 2006 11:54 pm View user's profile Send private message
Eric Davis



Joined: 31 Jan 2005
Posts: 54

Post Re: Mail Send issues Reply with quote

Detached seems to have no effect on the job.. It does not bog down 24x7, yex, but it still creates this error message

: Please ensure all jobs are set to run detached.

Wed Mar 22, 2006 8:25 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7963

Post Re: Mail Send issues Reply with quote

logs, etc... That's why I would suggest the following plan for dealing with the issue.

Since you are already sending this from script type jobs it should be relatively easy to create a global user-defined function MyMailSend and replace everywhere in the code MailSend with MyMailSend
MyMailSend should be coded to write to a log file before and after sending anything and optionally use semaphoring to ensure only one message is sent at a time.

Here is how you can do it assuming MyMailSend has 4 parameters: jobid, recipient, subject, message

// Append to the log file
Dim( file_number, number )
Dim( line , text )
FileOpen( "c:\\mail.log", "LineMode", "Write", TRUE, file_number )
FileWrite( file_number, " START *** @T"mm-dd-yyyt hh:mm:ss" ***" )
Concat( "Job: ", jobid, line )
FileWrite( file_number, line )
Concat( "Recipient: ", recipient, line )
FileWrite( file_number, line )
Concat( "Subject: ", subject, line )
FileWrite( file_number, line )
Concat( "Message: ", message, line )
FileWrite( file_number, line )
FileClose( file_number )

MailSend( "my@mycompany.com", "password", recipient, subject, message )

// Append to the log file
FileOpen( "c:\\mail.log", "LineMode", "Write", TRUE, file_number )
FileWrite( file_number, " END *** @T"mm-dd-yyyt hh:mm:ss" ***" )
FileClose( file_number )

Let this run for a while and review the log. The log will will provide you with an idea of what is happening (if any) that causes mail failures or at least show some patterns

: Detached seems to have no effect on the job.. It does not bog down 24x7, yex,
: but it still creates this error message

Wed Mar 22, 2006 10:53 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.