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

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

Recommended Posts

Posted

I have used the PHP Site Assistant to create an Add Record and Confirmation site.

I now want to edit the PHP files to also send an email on Confirmation.

What is required to get FileMaker Pro Server 9 Advanced to perform this function?

Posted

Hi,

you have to edit the confirmation.php-file.

There you have to add some PHP-code to send an email.

You can try to send it via the mail()-function of PHP.

http://de2.php.net/manual/en/function.mail.php

If this doesn't work (maybe you have no sendmail or things like that running), you can use some class like phpmailer (you can entre some smtp-mail-server to send emails with.

http://phpmailer.codeworxtech.com/

Hope this helps a little bit.

/horst

Posted

I have my FileMaker Pro Server Advanced 9 running on OS X Server 10.4.11

Just not sure how to send a confirmation page as an email to an email address.

Would like to send the Field Headings and Data submitted in the body of an email.

Since this server is NOT my email server, I would assume I would need to specify the IP Address of my email server (SMTP), but not sure where.

When I look in the php.ini file, the comments are Win32 only (I am on OS X). Do I need to mess with php.ini?

php is all new and greek to me.

Posted

After experimenting, I found that I can send an email, now I just need to figure out how to include the FileMaker data in the email body.

What I have right now is

<?php

$to = '[email protected]';

$subject = 'subject goes here';

$message = 'message goes here';

$headers = 'From: [email protected]';

mail($to, $subject, $message, $headers);

?>

I would like to get the From: address from an input field in FileMaker where I ask the user for their email address.

I would like to include the field data in FileMaker in the $message part.

I don't know how that is done though. Can anybody help with that part?

Posted (edited)

I figured it out after a lot of experimenting.

I now have a solution that emails the information supplied on a form. I am very happy.

It required doing something like this:

<?php

$to = 'email address goes here';

$subject = 'Registration-' . $record->getField('Student Name', 0);

$message = 'Student Name: ' . $record->getField('Student Name', 0) . "rnrn";

$message .= 'Birth Date: ' . displayDate( $record->getField('BirthDate', 0), $displayDateFormat) . "rnrn";

.

.

.

the period apparently means 'also' and allows you to put together different parts.

Also found that I could put together a string of messages by using .=

It's working, and I am very happy.

Edited by Guest

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