Jump to content
Server Maintenance This Week. ×

Sending an email when new record added


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

Recommended Posts

  • Newbies

Hi folks,

I have used the PHP Site Assistant to create a few online forms that dump data into a FM database. Works very well and have done this quite a few times.

I would like to be able to have an email automatically sent any time someone fills out one of these forms. I am using old PHP code I had lying around to send an email using the ob_get_contents() function to load the data into the message of the email. (Used to do this all the time to send emails of raw html form data.) Got this working, but the way that FMview.php works, the field names get translated into numbers instead of something even remotely human readable, so the emails are essentially useless.

Has anyone done what I am trying to do or have an easy solution?

My company has not yet upgraded to Server 10. In v10 is it possible to write a FM script that sends an SMTP email through FM Server that is triggered by PHP that would allow me to accomplish what I am trying to do?

Any thoughts or help would be appreciated.

Link to comment
Share on other sites

  • 2 weeks later...
  • Newbies

Thanks for the bump, printdrive.

All I can figure to do is to hardcode PHP that converts the numeric field identifier into its corresponding field name, but this seems silly, as I would like to use this email code for multiple projects.

Is there a function in fmview.php that returns the name of the field given the field id number?

Link to comment
Share on other sites

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