Jump to content

IWP and PHP for emailing and scripts?

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

Recommended Posts

Can someone explain how an IWP button/ script could generate an smtp email via php, etc? Do you use openurl script step and pass params? If so, does this require a pop-up window? Is it professional? Secure? Can it be done behind the scenes without the user knowing? I want a button from IWP to generate an email back to the creator of the record's email (to authenticate email address). Within the body of the email that was generated would be a link to FMP that would set a status field="active" and perhaps perform another script, thereby authenticating the user. Examples, books or resources to learn how to do this would be GREATLY and SINCERELY appreciated!

Link to comment
Share on other sites

Thanks for the response! Do you know of any online examples so I could see in action? Could this be performed totally behind the scenes so that the user wouldn't see? Finally, do you have any recommendations on books, etc. for learning this stuff? Thanks again for your time!

Link to comment
Share on other sites

I don't know of any examples. However, I have any application that has a Script which uses Applescript and PHP to import (sync) data from a MySQL database.

I can't see any reason why the Script and the sending of the email will not be hidden from the user.

Books with content on Instant Web Publishing (IWP) and Scripts may not exist. However, FMWebSchool have books on PHP and FM.

All the best.


Link to comment
Share on other sites

Hi there,

you could write it al in php, but since you're using IWP you dont want the hasssle of iwp. There is a way ot create the email by using the scriptstep mail.

But that's not satisfying. Check out the SMTP-it form on sending email with plugins. (full html fat, soggy rich emails) Getting the answer back, though requires skills in php finding and editing records.

Read www.fm-and-php.info and it'll become more clear. It's an easy php class you'll master in a few hours (days).

Good luck programming!


Link to comment
Share on other sites

I think Gary was on the right track. The OpenURL command would be fed a value that was the php script, along with the data you wanted to send as a message. These would be appended to the base URL as name/value pairs, like so:

ww w.mysite. com/[email protected]⊂=Your%20Subject&body=Your%20text%20here

s_mail.php would parse this into the php command for sending mail. Something like:

* s_mail.php to parse msg from fm and send

$to = $_GET['to'];

$sub = $_GET['sub'];

$body = $_GET['body'];

$sent = mail($to, $sub, $body);

Keep in mind that according to the PHP docs, you will need to have access to the sendmail binary on your system in order for this to work.

As for the rest of your questions (professional, secure, hidden, etc.) I would just try it all out and see what happened...


Edited by Guest
Link to comment
Share on other sites

This topic is 5697 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.