December 3, 200520 yr Previous I asked if anyone had any examples on how to e-mail with XSLT. Martin sent me the test_email example and I can make it work but I have problem. I want user to enter information in the a form. This form adds and new record. One of the fields that is added is the customers e-mail address. I want to take that e-mail address from the form and send the person an e-mail. All the code I see hear lets you dynamically change the subject and the body but none let the sender name be added dynamic. This is a huge problem for everyone of my applications. I will not know who the e-mail needs to go to until the user fills in the form. Does anybody have an example of this. I'm just learning xml/xsl. Any and all help will be a life saver for me. Thanks Hope
December 3, 200520 yr Sorry Hope, I was very busy last week and not able to answer you. See enclosed example (without the FM7 database, that you have already. You should add an emailaddress field there). test_email.zip
December 6, 200520 yr Author Martin, I'm sure you here this a lot but you are great! That works perfectly. I wanted to respond to this post because it gives me a chance to explain what I was able to do. I have a FM7Advanced server that host my FM7 database. I was able to turn in Instant Web publishing but I couldn't send an e-mail. But thanks to Martin, I was able to combined IWP AND CWP and it works fantastic. I now send e-mails from my IWP with the xsl stylesheet. This is something that should be known for all FM developers because it saves a lot of time to just turn on IWP. I'm still struggling a bit with the e-mail functio because I also want to be able to cc people in the e-mail and I don't see where Filemaker gives a good example using all of the smtp fields. So Martin once again thank you, and if you have any cc examples pulling dynamically from fields please let me. If anyone wants examples of how I've done this I will be happen to give a examples. Hope
December 8, 200520 yr Hope, yes, we are interested to see an example, please post it here. check p.61 of the FMS7A Custom Web Publishing Guide, everything is there, and figure out how you have to change the concat() part. You can concat up to 16 strings with concat(string1,string2,....). If you need more, nest the concat().
February 4, 200619 yr PLEASE!!!! I have been all over these forums trying to figure out how to combine IWP and CWP with regards to sending emails! I would appreciate any help and files that you can provide. My scenario is this: My site is built in IWP. The user has created a record in IWP (thus their email is captured) and their status is set to "pending". They click a submit button in IWP that I want to send an email back to them (for verification that the email was legitimate). Therein lies the problem: how to generate an email from IWP! I'd also like in the body of the email to contain a link that would allow them to access their created record and set the status text field from "pending" to "active".
February 4, 200619 yr Well, Hope did not post an example. But probably he used an Open URL script step which calls the XSLT page that sends the e-mail. Unfortunately, I never used IWP and will not do, because it does not conform to our needs.
February 4, 200619 yr I would appreciate any help and files that you can provide. My scenario is this: My site is built in IWP Checkout Cyborgsams template: http://www.fmforums.com/forum/attachment.php?attid/5649/ --sd
February 4, 200619 yr Thanks for the example, Søren. If it's ok that the user's mailer pops up, then it's fine. If the e-mail must be sent server-side, there's no way around to combine IWP and CWP.
February 4, 200619 yr Yes a thing we've struggled with is if the user doesn't send the created mails. there's no way around to combine IWP and CWP. Rumors says that one of the companies I work for are abel to make a CURL act as an extra via IWP client from the same machine as hosts. If Curl can simulate Safari correctly can each sides content be piped into an e-mail client perhaps even the buildin unix email system of the server machine. I raised this problem to a unix geek, and he came up with something that I havn't been able to test yet - it's something to do with making markers in the page as identifier for where the various fields starts and stops ...the stuff IWP spits out is not straight forward HTML to be honest: curl --user-agent='...' http://... | sed -e 's/!%EMAILSTART%!/n!%EMAILSTART%!/g;' | sed -e 's/!%EMAILSLUT%!/!%EMAILSLUT%!n/g;' | grep '!%EMAILSTART%!' |sed -r -e 's/!%([A-Z]+)%!//g;' >> emailadresser.tab --sd Edited February 4, 200619 yr by Guest
February 4, 200619 yr I saw that example from Cyborgsams, but It seemed if that was just the openURL script step passing params which forces the email client to open. I want the email to be generated server side behind the scenes with no interaction with the user's email client. Edited February 4, 200619 yr by Guest
February 4, 200619 yr Good idea, Søren. You probably can pipe the results to the Unix command 'mail'. But you can also use configure email in your CWP XSLT settings (and of course, have setup a mail service such as sendmail or postfix in OS X Server or an analog Windows e-mailer). Then the solution would be platform independent.
February 9, 200619 yr Søren, I'm not sure how the idea with curl would work. The Perform AppleScript script step is not web compatible (i.e. can not be used with IWP).
February 25, 200619 yr Author My apologies for not posting my files yet. I should have mention that I am using IWP but I am also running a Filemaker7 Advanced server. This is how I am able to combine IWP and e-mail. I have only one XSLT systlesheet on the webserver that is used when a person clicks on the link. It's actually not complicated because the link does not but call the XSLT systlesheet. If you see Martin's example stylesheet, that is what I used. If you are still interested in the files please e-mail at [email protected]. By the way, if your using IWP and you want to do e-mails without using a stylesheet you will have to place the "sendmail" html coding in your Filemaker field. The disadvantage of this is that it pops open the users e-mail client and they have to send it themselves. That solution wouldn't work for me because I didn't want the user to have to do this. That is why just one stylesheet on the server works great and saves a lot of development time because I do everything IWP and don't like to build CWP solutions.
May 29, 200619 yr Newbies I used your test files and the test_mail2 page loaded saying that E-mail had been sent but it hadn't. Our mail system says there is a Protocall Violation. Do you have any thoughts on this?
May 29, 200619 yr Do you use a mailserver which is external to the WPE server or is it on the same server?
Create an account or sign in to comment