February 4, 200619 yr can you generate emails with xml/xslt and FMSA or do you need middleware such as php to do so?
February 4, 200619 yr You can with XML/XSLT. Look at the FMSA Custom Web Publishing Guide, fmxslt:send_email function and the various examples posted here in the forum.
February 6, 200619 yr Author I read that and now am more confused and hope you can clarify. I am new to xml. So my question is can I use IWP to send an open url with the xml parameters which have been captured from the db to FMSA and have it send out the email automatically BEHIND THE SCENES? Scenario I am proposing: user creates record in IWP with email address. User clicks submit button in IWP which sends an openurl script with xml parameters, smtp parameters... and the FMSA spits out an automatic email? I hope this makes sense. I could not follow the other thread discussion with "Curl", etc. Thanks once again!
February 6, 200619 yr Yes, this is possible. If you can wait and I can find the time, I can post an example in the other thread.
February 7, 200619 yr Author Thanks Martin, I appreciate the help when you get the chance! I also read the pages in fmsa8_custom_web_guide.pdf on emailing and if I understand you correctly I need to pass these params via an open URL script step in IWP? It seems as if this will always force a pop-up window (acceptable but not ideal, esp. if user has them blocked). Secondly, as I am totally unfamiliar w/ xsl style sheet creation, I have no idea how to create the style sheet for emailing. Again, i don't care about the "formatting" of the email, as i don't want the sender of the email to see it happening. I do however, want in the body of the email being sent a link that when clicked will perform a script in FMP (which is probably a completely different problem). Again scenario: User creates record in IWP (record contains email field of creator)>User clicks button in IWP>button generates an email behind the scenes back to user (confirmation of email address)>User receives email with a link that when clicked runs a script within FMP (the primary effect of this script would be to set the user as "Active" and then the script would generate another email behind the scenes). Edited February 9, 200619 yr by Guest
February 9, 200619 yr Part 1, e-mailing, solved. See attached file (quick and dirty). Part 2 will come later, but maybe you can figure it out yourself. Check the XML query syntax in the FMSA Custom Web Guide. You need just to construct an URL that edits the record. test_emailiwp.zip
February 10, 200619 yr Author Martin, first thank you so much for taking the time! I am trying to test your solution but am getting this error: The requested stylesheet file could not be found (FILE-ER0001) Where should I place the stylesheet? Mac OSX? Thanks again!
February 10, 200619 yr FMSA 8: /Library/FileMaker Server/Web Publishing/xslt-template-files FMSA 7: /Library/FileMaker Server 7/Web Publishing/xslt-template-files
February 10, 200619 yr Author Sorry for the hand-holding needed here but I moved the xsl file (I'm using FMSA 7) and am still getting the same error. Perhaps I need to call the file differently from withing FM open URL? I am testing on the same machine so all I changed for my IP is>localhost: "http://localhost/fmi/xsl/test_emailiwp.xsl?-grammar=fmresultset&-db=test_emailiwp&-lay=test_emailiwp&id=" & test_emailiwp::id & "&-max=1&-find" I feel so close!!!!
February 10, 200619 yr localhost does not work for an external user. You have to enter the hostname (www.something.topdomain)
February 11, 200619 yr Author still not working. I changed to: http://10.0.1.4/fmi/xsl/test_emailiwp.xsl?-grammar=fmresultset&-db=test_emailiwp&-lay=test_emailiwp&id=1&-max=1&-find Here is the error page: Error.pdf
February 11, 200619 yr Did you set the permissions (-rw-rw----) and owner/group (e.g. admin/fmsadmin) of the stylesheet file correctly?
February 11, 200619 yr Author After palying with the user/ groups (either system or account) all with r&w access, no more error dialogue. However, no email is generated. I have attached my web publishing console screen. I am trying to send using my .mac account. I do put in my account and password (as text). Any more suggestions? Thanks again! FileMaker_Server_Web_Publishing_Administration_Console.pdf
February 11, 200619 yr Not sure if that works with .mac Did/Can you configure a mail server in the server administration tool of Mac OS X Server? When that is done, you should setup CRAM-MD5 authentication in the WPE administration, not "None", as in your screenshot before. Edited February 11, 200619 yr by Guest
February 11, 200619 yr Author Martin, I have a hosting account with Point In Space. I just emailed John to see if I can get the test files uploaded on my server there to test. It is eventually where I will want to run the IWP emails from anyway and i think that part of the problem could be my local setup and testing. I don't have OSX Server, just OSX. Would there be any reason why your solution woudn't work in a hosted environment? Thanks again!
February 12, 200619 yr I had tested it on our servers (OS X Server, FMSA8) before i posted it here, and it worked. As said above, it is quick and dirty, just an example how it could work. Anyway, you have to adapt both the IWP part and the XSLT file to how and what you want to send. I had also thought about a solution, that would work without a popup window, but would be asynchronous. It would run along a the following line, and use the curl idea of Søren: - when the user clicks on the e-mail button, a timestamp is written to the record - a cron job regularly checks with curl for the records with newest timestamps, e.g. it loads an XSLT that works through those records and sends the e-mails
February 12, 200619 yr Author I have the db you created hosted: http://rentalfinders.pointinspace.com:80/fmi/iwp/cgi?-db=RTFtest_emailiwp&-loadframes I haven't made any changes to the style sheet. Also, here's a copy of the modified script step: "http://rentalfinders.pointinspace.com/fmi/xsl/test_emailiwp.xsl?-grammar=fmresultset&-db=RTFtest_emailiwp&-lay=test_emailiwp&id=" & test_emailiwp::id & "&-max=1&-find" If you try to send the email, a completely different error page results. I am totally lost! Now that it is online, perhaps you can see what changes need to be made. Thanks for taking the time to help me (and hopefully others) on this!
February 12, 200619 yr You need to add /rentalfinders/ in your URL, eg: http://rentalfinders.pointinspace.com/fmi/xsl/rentalfinders/test_emailiwp.xsl?-grammar=fmresultset&-db=RTFtest_emailiwp&-lay=test_emailiwp&id=1&-max=1&-find - John
February 12, 200619 yr Author Hey John, I just dropped you an email. Perhaps you can help me get this thing up an running at PIS and then I can post the working scenario that Martin has so generously helped me with!
Create an account or sign in to comment