AnsweredAssumed Answered

Problem with running script via PHP

Question asked by vaios_p on Jul 20, 2017
Latest reply on Jul 20, 2017 by vaios_p

Hello everyone,

 

I have a problem with running a Send Mail Script Step via PHP.

 

This is the php code

 

$layout = 'My Layout';

$script = 'Send Mail';

$parameter = '';

$request = $fm->newPerformScriptCommand($layout, $script, $parameter);

$result = $request->execute();

 

if (FileMaker::isError($result))

{

$message .= 'The email address you entered does not exist' . '<p>';

}

else

{

$message .= 'Your password will be sent to your email address shortly.' . '<p>';

}

 

And this is the FileMaker Script.

 

Allow User Abort [ On ]

Set Error Capture [ On ]

Send Mail [ Send via SMTP Server ; No dialog ; To: "receiver@mail.com" ; Subject: "New Order of Services" ; Message: "Order received" ]

 

Go to Layout [ “My layout”]

New Record/Request

 

Now my problem is that when i run the script via PHP the mail is not sent (but i know the script has been executed because it creates a new record)

 

And i know the SMTP server is set up properly because when i execute the same script using FileMaker 15 is works perfectly , sending the mail i want.

 

Do you have any ideas on what might be the problem?

Outcomes