Jump to content

email script (VBS) does not work


tsardy

This topic is 7209 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi,

I'm running FileMaker Server 7 Advanced on a Windows 2003 server machine.

I have a vbscript which extracts user names from the FM server via ODBC and emails them to a specific address.

When I manualy run the script in the server it works correctly, Howewer it does not work, when it is started as a scheduled script from fileMaker server.

I got the following message in the FM event viewer:

Event ID 154

Schedule "A" aborted; ":" could not be found.

Does anyone know, what should be the problem?

thanks

Tibor Sardy.

PS: here is the script I have:

set msg = WScript.CreateObject("CDO.Message")

msg.From = "[email protected]"

msg.To = "[email protected]"

msg.Subject = "Birthday - " & DATE()

msg.TextBody = "List of people who have birthday today." vbCrLf

Set Conn = CreateObject("ADODB.Connection")

' Build the connection string

ConnectionString = "DSN=Personal;UID=x;PWD=x"

' Open connection

Conn.Open ConnectionString

sqstring = "select bDate, fullname From Personal where GSID <> 'a'"

Set RS = Conn.Execute(sqstring)

Do While Not (Rs.BOF Or Rs.EOF)

szuldat =Rs.Fields("BDate" )

if left (DATE(),5)= left (szuldat, 5) then

'MSGBOX Rs.Fields("BDate" )

msg.TextBody= msg.TextBody & Rs.Fields("fullname" ) & ", " & vbCrLf

end if

Rs.MoveNext

Loop

msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"

msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

msg.Configuration.Fields.Update

msg.Send

Link to comment
Share on other sites

This topic is 7209 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.