Jump to content
Server Maintenance This Week. ×

E-mail with xslt function needs to be dynamic


Hope Ray

This topic is 6542 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

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".

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 3 months later...

This topic is 6542 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.