1 of 1 people found this helpful
If you set error_capture ON, you will miss error messages if you don't ask for them. After mail step there should be something like:
Set Field [ result; Get ( LastError )]
And there might be a layout focus problem.
You first send the mail and then change layout. Which is the original layout? Does it allow email step to get required information?
Thank you for your response,
At the moment I am trying to just send an email, I do not have any data posted with the email.
It is from an online application where the user fills out a form , the data is posted back to FileMaker (and it is editing the correspodent fields correcty so far) and then i want an e-mail to be sent to inform my cilent that he has received a new online application.
I have very little experience with FileMaker , if i add the Set Field [ result; Get ( LastError )] step that you mentioned, do you think i might be able to identify any problems by accesing the FileMaker server log ?
With your help i have modified the script to look like this
Allow User Abort [ On ]
Set Error Capture [ On ]
Send Mail [ Send via SMTP Server ; No dialog ; To: "firstname.lastname@example.org" ; Subject: "New Order of Services Received" ; Message: "Order of services received through Online Form Submission" ]
Set Variable [ $error ; Value: Get (LastError) ]
Go to Layout [ “Errors” (Errors) ]
Set Field [ Errors::Error ; $error ]
Now i have the error code , it is 1502 The connection was refused by the SMTP server.
I also checked that I have the same error when I choose to perform script on server.
I believe it is safe to assume that the problem is not with the php, but most likely with SMTP settings of the FMS.
Thanks again for your help.
I would like to thank both you and user4078 for you time and help.
The problem was with the SMTP server settings , after changing that , the script now works like a charm.