June 18, 200223 yr Newbies Does anyone know how to make a script that notifies me via e-mail when a record is added over the web and how to start a script to send e-mail? Thanks,
June 18, 200223 yr In the web form that creates a new record, add the following: <input type="hidden" name="-MailHost" value="YourMailHost"> <input type="hidden" name="-MailTo" value="YourEmailAddress"> <input type="hidden" name="-MailSub" value="New Record Added"> <input type="hidden" name="-MailFormat" value="MailFormat.txt"> MailFormat.txt is a text file in your Web folder which can contain CDML tags, if you like.
June 18, 200223 yr Author Newbies Thanks for the fast response. I tried but for some reason it is not working. This is what I have on my form. <FORM ACTION=FMPro METHOD=post> <INPUT TYPE=hidden NAME=-DB VALUE='TEST.FP3'> <INPUT TYPE=hidden NAME=-Lay VALUE='Web'> <input type="hidden" name="-MailHost" value="mail.toronto.com"> <input type="hidden" name="-MailTo" value="[email protected]"> <input type="hidden" name="-MailSub" value="New Record Added"> <INPUT TYPE=hidden NAME="-format" VALUE="tc_reply.htm"> <INPUT TYPE=hidden NAME="-error" VALUE="tc_error.htm"> Thank You,
June 18, 200223 yr You will need some form of action tag; e.g. '-view'. You could also look at doing this from a script. The '-new' form that the web-user sends can also contain the '-script' tag. All the best. Garry
June 18, 200223 yr Author Newbies I had created the script to send an email. The script name is "sendemailtous". How should I put this on the form? This is what I have on my form. <FORM ACTION=FMPro METHOD=post> <INPUT TYPE=hidden NAME=-DB VALUE='TEST.FP3'> <INPUT TYPE=hidden NAME=-Lay VALUE='Web'> <input type="hidden" name="-script" value="sendemailtous"> <INPUT TYPE=hidden NAME="-format" VALUE="tc_reply.htm"> <INPUT TYPE=hidden NAME="-error" VALUE="tc_error.htm"> I tried this but it is not working. Thanks,
June 18, 200223 yr Make sure you have all the required tags: -DB, -MailTo, -MailFrom, -MailSub, -MailHost, -MailFormat, any action tag. I think you may be missing the -MailFrom and also the -MailFormat tag which refers to a text file at the same folder level as the other web pages. Take a look at article #106108 on the Filemaker site. It talks about doing mail with a script plus another method. http://www.filemaker.com/ti/106018.html I am having similar problems and will be trying these steps too.
June 18, 200223 yr Does the script work directly from FM? Are you using FM3; I noticed the .fp3 on your database name? If so it may not handle mail. In fact, which version are you using and which platform? Mail has some problems on the older Mac configurations. All the best. Garry
June 18, 200223 yr If the e-mail address is being entered the same time the record is being made, then it'll take two steps: first step creates the record, populates the field; second uses the field value to send the e-mail. Often after creating the record there is a "confirmation" message: send the e-mail from here.
Create an account or sign in to comment