dburgwin Posted June 22, 2003 Posted June 22, 2003 Hello, I have an Add format file into which people type their personal info and submit it to a database. There is a text field for an email address included in the form. I would like to be able to add this address to the database and have an email automatically sent to that address when the submit button for the add form is clicked. I have consulted the CDML reference and can not see how to have the email text field act as a -Mailto form and a form that adds the email to the database field at the same time. Is this possible? I have tried incuding the -Mailto function as a hidden item and included [FMP-field: Email] as the email address but I think the problem is that the email address does not yet reside in the email field of the database. Anyway, any help would be appreciated. I would ask, however, that if someone feels compelled to tell me to check the CDML Reference Databse they resist since I have looked at it and tried many variations based on the tags they list to no avail. If someone can help me combine the Add and the email function in one format file that would be great. Thank you Darryl Burgwin Graduate Programme in Sociology York University Toronto, Ontario, Canada
Unable Posted June 22, 2003 Posted June 22, 2003 You might try: 1. create record wherein -format="metarefresh.htm" 2. place your email on metarefresh.htm so it caputres the data from the newly created record and sends the email 3. also in that link/form on metarefresh.htm direct to -format="results.htm" with a -find on the -currentrecid. I just posted an example using a META Refresh in the Sample Files forum last week. While it does not send an email, it does demonstrate the use of a META Refresh.
Vaughan Posted June 23, 2003 Posted June 23, 2003 "I have consulted the CDML reference and can not see how to have the email text field act as a -Mailto form and a form that adds the email to the database field at the same time." That's because it needs two steps. I've done it like this: 1) user enters data, submits form; 2) Web Companion returns the "reply" page: this page has the CDML code to send the e-mail in a form to be submitted. 3) User clicks the continue button to proceed, and in so doing sends the e-mail message (or could be triggered by a meta-refresh). Obviously there is a big hole here, because it's possible for the user to make a new record but avoid the e-mail confirmation (by hitting the Back button and not clicking continue, for instance). One way around it is to put the extra step at the beginning oif the process, not at the end: force the user to enter their e-mail address *before* they see the add record page. That way you can have the e-mail CDML tags generated and ready to go at the same time the new record is created. In one system I've made, each user's login name is the first half of their e-mail address, so generating a confirmation CDML is easy at any time. However this only works because it's an intranet site and every user's e-mail address ends with the same string, which is hard-coded into the CDML.
dburgwin Posted June 23, 2003 Author Posted June 23, 2003 Hi Unable and Vaughn, Thanks for the advice. For now, I have followed Vaughn's first method of using a separate confirm page which sends the email. I have Filemaker sending emails but the problem you note does exist. Unable's suggestion is ingenious but I cannot get it to work. I set up the refresh format page with the mail instructions set up as hidden form items. I always receive an error, however. While troubleshooting I removed the meta refresh from the page and included a submit button. If I click the submit button mail is sent and the proper record then appears as a reply. But I do not benefit from the automatic refresh. My question, how do I encode the equivalent of submit into a hidden form item so that the refresh actually sends the mail? I hope this is somewhat clear. Thanks, Darryl Burgwin Graduate Programme in Sociology York University Toronto, Ontario, Canada
Steve T. Posted July 8, 2003 Posted July 8, 2003 Hi, DB! I will be working on something similar soon. I might try Vaughan's method since he laid it out so nice and neat for us, but before your inquiry about this, I had researched this a little and was going to try using an inline action on the form submittal follow-up page. Inlines are executed on load so does not require the user to CONTINUE or anything. To identify the target record(s), I was going to toggle a field value (UNSENT/SENT). That's my plan, anyway, but it's nice to know about the Vaughn 2-step e-mail dance in case it doesn't work out (Thanx, Mr. Moderator!). Please post your final solution if you end up finding something that works the way you want. -- Steve T.
Unable Posted July 9, 2003 Posted July 9, 2003 Since the above post in which I provide a reference to Garry's answer, I have posted an example (Sample Files forum) of an onLoad form submission (though not with email) demonstrating such a submission. Steve, if you read carefully what I posted prior to Vaughan's post to which you have referred, you will see the only difference between the two is the "Submit" button in Vaughan's solution. Vaughan then paranthetically goes on to agree with the META refresh of my solution as an alternative to client interaction.
macaroni Posted July 10, 2003 Posted July 10, 2003 Does the sending mail through CDML work with using the -MailHost for emails such as a .Mac account? I'm no pro in these areas of servers and mail servers but can anyone explain to me how can I get this to work with my own server at home that has Unix' Sendmail activated to sendmail in Mac OS X. Thanks.
Steve T. Posted July 11, 2003 Posted July 11, 2003 Unable said: Steve, if you read carefully what I posted prior to Vaughan's post to which you have referred, you will see the only difference between the two is the "Submit" button in Vaughan's solution. Vaughan then paranthetically goes on to agree with the META refresh of my solution as an alternative to client interaction. Hi, Unable! Sorry.. didn't mean to damage your blooming reputation as a FileMaker wiz-kid. We're all just trying to help each other out. I've appreciated several of your posts, too. In this particular case, I guess I was just unable to read carefully enough, eh? Actually, I mentioned Vaughan's specifically because he has discussed parts of this in several earlier posts, but this one was nice and clean, IMHO. I also just have a personal bias against REFRESH solutions that throw users around without their knowledge. Keep up the good work, and thanx for telling me I can't reeed! At least I can ryte, thow. --ST
Unable Posted July 11, 2003 Posted July 11, 2003 " Sorry.. didn't mean to damage your blooming reputation as a FileMaker wiz-kid. We're all just trying to help each other out. I've appreciated several of your posts, too. In this particular case, I guess I was just unable to read carefully enough, eh?" I appreciate every pun in those three sentences. I count three. How many puns did I miss?
Steve T. Posted July 11, 2003 Posted July 11, 2003 My teachers say I get to learn numbers and counting next year. I'll try to remember to get back to you then! LOL!! --ST
Recommended Posts
This topic is 7875 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 accountSign in
Already have an account? Sign in here.
Sign In Now