December 11, 200718 yr 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?
December 11, 200718 yr 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
December 12, 200718 yr Author 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.
December 12, 200718 yr Author 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?
December 12, 200718 yr Author 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 December 12, 200718 yr by Guest
Create an account or sign in to comment