View Full Version : Can formmail pass data to remote url?
Is it possible to use formmail to post form data submitted to it to another URL?
I am looking for a way to use the AT-MANGLE part of it to protect the email address in PayPal add to cart forms. All I thus need is to be able to post the form data to it with the mangled email address, and then instead of sending an email it needs to turn around and post the data to the secured PayPal site.
Possible?
[I posted this in the community help forum also and it was suggested I post here instead, sorry about the duplication].
russellr
20-Apr-2006, 05:58 AM
Hi,
AT_MANGLE is only used to un-mangle the email address that FormMail will use to send email. So, that's not going to achieve what you want.
But you can obfuscate the email address from spambots using derive_fields.
To answer your other question, no, in general, FormMail cannot "onward post" to another URL.
It can, however, redirect the user's browser to another URL.
With our use of PayPal, we simply have a URL that people can click - so we know this works. I can't think of any reason why it would not work for you too.
A number of people have asked for "onward posting". We haven't implemented it in FormMail because as far as we know, the redirect feature will work to send details to PayPal for processing. There's no need for "onward posting".
So, check out whether you can create a simple clickable URL that does what you want. If so, you can redirect from FormMail to that URL too.
Russell, please let me know if I got this right:
1) Break the hidden PayPal "business" email address field up into more than one hidden field [using my own names] to obfuscate it and then put it back together using a derive_fields field and concatenation.
2) Provide PayPal "action" url to submit form data to within the good_url field value.
3) Provide NO email field so Form Mail does NOT send an email to anybody.
Please let me know if this is what you are speaking of.
If so, it sounds brilliant my man.
russellr
21-Apr-2006, 03:57 AM
Hi,
Yes, that's it.
But, the PayPal URL has to be something you could just put on a web page. It must not be a POST method URL. It must be a GET method URL.
Well that is a problem as PayPal shopping cart data must use the post method to pass the data.
Also, I was playing with this method and I could not get it to work, getting [M25], [M26], and [M23] errors so I never got so far as seeing what the post to the PayPal good_url value would do.
Another problem is going to be that the PayPal form tag uses the "target" parameter with its value set to "paypal" and there is no way to set that value that I know of doing it this way.
Well Russell, maybe its time to add the postTo_url part of Form Mail -- like you don't have anything better to do right?
Thanks for the help as always.
russellr
21-Apr-2006, 04:42 AM
Hi,
Is this the PayPal code we're talking about: http://www.paypal.com/cgi-bin/webscr?cmd=_pdn_howto_checkout_outside
There's a problem with this because PayPal is expecting to be talking to the user's browser. It will ask the user questions (e.g. what's their PayPal id and password).
The server can't do that on behalf of the user.
So, contrary to what I said previously, we can't implement that in FormMail. :o
What you can do is use "good_template" to generate a final page from which the user must submit to make payment.
However, that won't have a mangled email address.
If all you want is the mangled email address, you might have to ask PayPal to implement mangling.
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.