Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a script that includes the Send Mail script step using SMTP, performs without dialog and runs with full acces privileges. It works great in FMP, and although it should be web compatible in this configuration, it doesn't run when I initiate the script from a web page using the PHP API. If I disable this step in the script, the rest of the script runs without any issues. My goal is to send an email notifying someone that a specific action has been made. This action occurs in the script that is being run.

Any ideas what might be wrong? Any suggestions for other methods of sending the email? I am using FMStudio with the FileMaker PHP API along with FMP 11 and the file being hosted on FM Server 11 Advanced.

Thanks in advance for your help.

Sol

Posted

I send all the emails in my CWP solutions directly from PHP. I have my FM script set a flag field in a flag table (as the last step, so as not to have the PHP script query the database before the FM script is done). Then I have a cron run a script in PHP that checks the flag field, sends the email if the flag is set, and then resets the flag field. The cron can be scheduled to run the script at whatever interval you determine you need.

Posted

@Vaughan, I'm getting the error code 1502 in the FileMaker Admin console. This error code means: "The connection was refused by the SMTP server." The confusing part is that it works fine when I run the script in FMP, so the SMTP config must be ok. Is that right, or am I missing something? The other thing I thought was that maybe the SMTP server used is different when the script is initiated through the PHP API. Any thoughts on that? Does the PHP API require you to use a localhost SMTP server? I am using our ISPs SMTP server. I have also tried using our web hosting SMTP server. Both work fine in FMP, but not when the script is run through a web page built with the PHP API.

Thanks again for all your help.

Posted

Figured it out (kind of)!! I decided to set up the built in Windows SMTP server on my Win 2008 server box so that I could send email using PHP instead of the FileMaker script. In the process I also opened port 25 outbound on the Win 2008 bult in firewall. Now the FileMaker script works when triggered from web publishing!

I'm not sure if it was setting up the SMTP server or opening the port, but one (or both) have enabled the email script to work through web publishing. Since the SendMail script step points to our ISPs SMTP server, I'm guessing it was the firewall that was the issue.

This topic is 4865 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.