SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Email Notification does not work when running

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Email Notification does not work when running
Author Message
Geogie Varughese



Joined: 24 Jan 2003
Posts: 2

Post Email Notification does not work when running as s Reply with quote

Hi
When I have 24X7 run as a service and I have the job start notification checked
with the notification action being send email.
I get the following error
Notification Action failed.Sending mail failed.Logon Failed
It continues to run and sucessfully ends the application
but the vbscript code that I have to send email does not send the email.

If I stop the service and run the stand alone version every thing works perfectly fine.

I need to know how to get this to work when its being run as a service.I am running this on a Windows XP proffessional.

The following is the VB script
Sub Main()
Dim fso, DailyRecptFile

dim sFileName

sFileName="C:\temp\DailyReceipt.xls"

Set fso = CreateObject("Scripting.FileSystemObject")

If (fso.FileExists(sFileName)) Then

Set DailyRecptFile = fso.GetFile(sFileName)

DailyRecptFile.Delete

end if

'Email the file to intended recepients

dim sRecepients,sBody

sRecepients="gVarughese@synavant.com"

sBody ="TEST"

SendMail sRecepients , "Test" ,sBody , sFileName
end sub

Sub SendMail(sAddress , sSubject , sBody , sAttachment )

On Error resume next

Dim App

Dim Itm

Dim i

Dim lPos

Dim iCount

Dim sDisplayName 'This will hold the name of the file without path

sDisplayName="Daily Receipt Report"

Set App = CreateObject("Outlook.Application")

Set Itm = App.CreateItem(0)

'Parse the attachments to get individual attachments

'icount will contain the number of attacments

iCount = 1'ParseString(sAttachments, s_arrAttacments(), ";")

With Itm

.Subject = sSubject

.To = sAddress

.Body = sBody & chr(13) & chr(13)

lPos = Len(.Body) + 1000

'Loop through the attacments, adding each attacmnet

'get the name of the file

lPos = lPos + 1000

'Add attachments if file exists

.Attachments.Add sAttachment, 1, lPos, sDisplayName

.Send

End With

End Sub

Your help will be appreciated
Thanks
Geogie Varughese

Thu Feb 13, 2003 11:52 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7963

Post Re: Email Notification does not work when running Reply with quote

Do not use MAPI. Configure 24x7 to use SMTP email.

: Hi
: When I have 24X7 run as a service and I have the job start notification
: checked
: with the notification action being send email.
: I get the following error
: Notification Action failed.Sending mail failed.Logon Failed
: It continues to run and sucessfully ends the application
: but the vbscript code that I have to send email does not send the email.

: If I stop the service and run the stand alone version every thing works
: perfectly fine.

: I need to know how to get this to work when its being run as a service.I am
: running this on a Windows XP proffessional.

: The following is the VB script
: Sub Main()
: Dim fso, DailyRecptFile

: dim sFileName

: sFileName="C:\temp\DailyReceipt.xls"

: Set fso = CreateObject("Scripting.FileSystemObject")

: If (fso.FileExists(sFileName)) Then

: Set DailyRecptFile = fso.GetFile(sFileName)

: DailyRecptFile.Delete

: end if

: 'Email the file to intended recepients

: dim sRecepients,sBody

: sRecepients="gVarughese@synavant.com"

: sBody ="TEST"

: SendMail sRecepients , "Test" ,sBody , sFileName
: end sub

: Sub SendMail(sAddress , sSubject , sBody , sAttachment )

: On Error resume next

: Dim App

: Dim Itm

: Dim i

: Dim lPos

: Dim iCount

: Dim sDisplayName 'This will hold the name of the file without path

: sDisplayName="Daily Receipt Report"

: Set App = CreateObject("Outlook.Application")

: Set Itm = App.CreateItem(0)

: 'Parse the attachments to get individual attachments

: 'icount will contain the number of attacments

: iCount = 1'ParseString(sAttachments, s_arrAttacments(), ";")

: With Itm

: .Subject = sSubject

: .To = sAddress

: .Body = sBody & chr(13) & chr(13)

: lPos = Len(.Body) + 1000

: 'Loop through the attacments, adding each attacmnet

: 'get the name of the file

: lPos = lPos + 1000

: 'Add attachments if file exists

: .Attachments.Add sAttachment, 1, lPos, sDisplayName

: .Send

: End With

: End Sub

: Your help will be appreciated
: Thanks
: Geogie Varughese

Thu Feb 13, 2003 12:13 pm 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.