Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Anyway IWP User can email too?


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

Recommended Posts

Posted

Hi everyone. In my form i did a button that open my default email appliaction 'Lotus' and user jus need to enter any more information they wish to state then click send.

I put it up on IWP but users who do not have FM when clicked the button nothing happened, users can only choose 'submit'. And I finally found out why from the filemaker 7 guide book i bought. IWP did not supports emailing sript.

Is there anyway to use a 3rd party client or plugs-in to allow users to send the form as email??

Thanks a lot..

Kelvin

Posted

The basic form of an email URL is:

"mailto:[email protected]?Subject=My Subject, OK to use spaces&Body=My Body, OK to use ¶s"

This syntax depends on ?s and &s to delineate the Subject and Body parts, so only a single ? and/or a single & should be present in the URL. The Subject and the Body are both optional, one can be present without the other. Some email applications protest when there are blank subjects.

Set the script step Open URL to "Perform without dialog", then "Specify...":

"mailto:" & EmailAddressField &

"?Subject=" & Substitute ( Substitute (

SubjectField

; "?" ; "--QuestionMark--" ) ; "&" ; "--Ampersand--" ) &

"&Body=" & Substitute ( Substitute (

BodyField

; "?" ; "--QuestionMark--" ) ; "&" ; "--Ampersand--" )

If there are no ?s or &s in the subject and body, the Substitutes can be eliminated. If the user can enter any of this data in FileMaker, leave in the substitutes (it's common to ask a question...).

If the fields EmailAddressField , SubjectField, and BodyField are replaced with literal strings that do not contain ?s or &s, then the basic form of the URL at the top can be used.

Posted

Hi, sorry im not good in this. Did you mean i had to create another layut and input the things i wanna send in the EmailAddressField, SubjectField and BodField i created?

Then i just need to paste this coding you stated in my script?

"mailto:" & EmailAddressField &

"?Subject=" & Substitute ( Substitute (

SubjectField

; "?" ; "--QuestionMark--" ) ; "&" ; "--Ampersand--" ) &

"&Body=" & Substitute ( Substitute (

BodyField

; "?" ; "--QuestionMark--" ) ; "&" ; "--Ampersand--" )

Sorry about it, really need help on this..

Thanks a lot..

Kelvin

Posted

Kelvin->

You don't need to use the fields, you can use the basic form, substituting your email address, etc. For example:

mailto:[email protected]?subject=Email from FM IWP

When the new email opens in the user's email client, they can edit it & add info before sending.

Posted

Hi CyborgSam,

I am sorry i really do not know how to do it..

Can you explain and guide me along..

I am on industry attachment, this is my third week doing with filemaker, my boss want users on iwp can email too... *Headache*

Help will be very appreciated a lot..

Thanks..

Kelvin

Posted

Hi Sam, really thanks a lot..

But can someone explain to me how it works..?

Why all the fields are globals? What will be the difference if we use text?

"mailto:[email protected]?Subject=IWPForm&Body=" & Substitute ( Substitute (

IWPForm::g_Name_First & " " & IWPForm::g_Name_Last & "¶" &

IWPForm::g_Address_Street & "¶" &

IWPForm::g_Address_City & ", " & IWPForm::g_Address_State & " " & IWPForm::g_Address_Zip & "¶" &

IWPForm::g_Comments & "¶"

; "?" ; "--QuestionMark--" ) ; "&" ; "--Ampersand--" )

This coding call for default email through 'open url' its really superb!! But I dun really understand some of the things like

What is'substitute' referring to? the email text box??

And why are there '& "¶" &' between each field, its a must to have?? serving what purposes??

And '; "?" ; "--QuestionMark--" ) ; "&" ; "--Ampersand--" )', what is this..?

Lastly beside putting in values from fields, how can i input my own words in the email..? Every mail will have that sentence of words, its like a standard/format.

Thanks a lot....

Kelvin =)

Posted

Why all the fields are globals?

Globals were used in the demo because the info was not stored in a record in the database. If your email message content comes from a record, then use normal text fields.

What is'substitute' referring to?

The Substitute ( text ; searchString ; replaceString ) functions are used to remove ?s and &s from the text, those characters are "escape" characters, they are interpreted as having something special after them.

And '; "?" ; "--QuestionMark--" ) ; "&" ; "--Ampersand--" )', what is this..?

They're the searchStrings and replaceStrings in the above Substitute, just a way to let you know the user typed a ? or an &.

And why are there '& "¶" &' between each field

So the email is formatted nicely, otherwise everything would be on one line.

how can i input my own words in the email..?

The text in the OpenURL is a basic FileMaker text calculation, so literals and/or fields can be used. If you don't need any fields, use the basic form of an email URL as in a previous post:

"mailto:[email protected]?Subject=My Subject, OK to use spaces&Body=My Body, OK to use ¶s"

Example:

"mailto:[email protected]?Subject=Report from Filemaker Database&Body=Here's the first line in the body¶This is the second line"

Posted

Hi sam, really thanks for your reply.

Still having some problems..

kelvin songst91hougang, singapore 888888emaillllllllll <-- this is my final result in the email, seems like ¶ is not doing his job~

how to do this sign, '¶' ??

Rushhour Said:And '; "?" ; "--QuestionMark--" ) ; "&" ; "--Ampersand--" )', what is this..?

'They're the searchStrings and replaceStrings in the above Substitute, just a way to let you know the user typed a ? or an &.' <-- Sorry i stil dun realli understand on this.. just to let to know the user typed a ? or an &:??

hm... if i wish to input the receiver email from a field stored in record.. how should i go about doing that..?

Example:

"mailto:[email protected]?Subject=Report from Filemaker Database&Body=Here's the first line in the body¶This is the second line" <-- hm.. is there a limit on the text? cos i play with it and reliase in the email it never showed all the text i entered..

Thanks a lot sam~

Kelvin =)

Posted

Sam--

Your example got me thinking, so I put together a custom function to replace problem characters with their hexadecimal equivalents. Take a look here to see what it's about. Basically, it makes it simple to be sure that your messages get sent via the mailto URL script step, and those pesky question marks get translated through to their destination.

HTH.

David

Posted

Hi..

erm.. can someone help me with my doubts..

and for this..

"mailto:[email protected]?Subject=Travel Request Form&Body=A Travel Report

had been made and require your attention.¶Please proceed to 'localhost/fmi/iwp' -->

'Travel Request and Report Form'.¶Thank You." <-- hm.. is there a limit on the text? cos i play with it and reliase it only allowed 1 line of text in the email..

Bigger problem now!! this script will only works when user default email application is not open. If he already opened his mail appliaction then process the form, upon clicking the submit button, this script won't be working....

Help!!!!!!!!!!

Thanks a lot..

Kelvin

Posted

Kelvin-> In the FileMaker, the ¶ character appears in a button when a calculation dialog is open. Click the Specify... button to open the calculation dialog.

There is no limit on the text, I suspect you're just not getting the ¶s in properly.

The "--QuestionMark--" is just to let the recipient of the email know that the user typed a ? question mark. Same for the "--Ampersand--" and the & ampersand. You can substitute any text you want for those characters, including a blank "".

I'm not sure why your email client is problematic, what client are you using?

Posted

T-Square->

I assumed that the email address was known and that the user would not be typing it in. Once the ? or & is encountered, the other characters that cause problems in URLs are not a problem in that text (at least for me on my Mac...).

Posted

Hello

Thanks a lot Sam~~

Im using Lotus 6.5.. This is a crucial problem.. why when default email client is already open, the script won't work then.. Help......

Thanks a lot

Kelvin

Posted

Sam--

It is true that the other characters in a mailto URL are not problematic, but I felt that if I were going to make a URL function, I would give the data a full cleaning so that it wouldn't have any chance of screwup in other circumstances.

I'll note that the Open URL step offers its own shortcomings, insofar as it appears that different browsers apply different arbitrary limits on the length that a URL can be. I say "arbitrary" because according to the W3 standards, there should be no limit on the length of the URL. However, Internet Explorer, for example, imposes a limit of approximately 2K on URLs; the Firefox browser that I am using seems to limit to about 1K.

This length limitation may be the source of Kelvin's problem. What I have found with Firefox is that if the URL exceeds Firefox' limit, the URL doesn't even trigger the mail program. To test this, Kelvin, try using a short message and see whether the problem remains.

What remains is that there isn't really any truly reliable way to send email from Filemaker. Darn.

David

Posted

Hi David, thanks for your reply.

Like Sam said, the problem of my limiting text is because im not getting the ¶s in properly.

I am only having 2 lines of words so it shoudn't be a problem. Strangely when user already opened his email client before accessing the form, the script won't work, openurl will not bring me to my email page.

But when user default email client is not opened. The openurl works perfectly.

And is ¶ not working in filemaker?? i got number of ¶ but it doen't paragraph at all. This is what are written in my openurl

'Subject=Travel Request Form&Body=A Travel Request/ Report

had been made and require your attention.¶Please proceed to 'localhost/fmi/iwp' -->

'Travel Request and Report Form'.¶Thank You."'

But in my mail it shows only this, all in my first line.

'A Travel Request/ Report

had been made and require your attention.Please proceed to 'localhost/fmi/iwp' -->

'Travel Request and RepoD'

Thanks a lot..

Kelvin

Posted

Kelvin--

I had similar problems until I changed over to using the hex codes. Since you're also having trouble with the line breaks, maybe you could try the hexadecimal swap function I linked to earlier.

The one caveat I'll note is that because Windows, Mac and Unix all use *different* hexcode sequences for line breaks, you may need to experiment a little. Oy.

David

Posted

Kelvin->

Try getting rid of the -->, perhaps it's being trapped by your email client as part of the URL. What email client are you using?

Sam

Posted

T_Square->

Your observations make me wonder if the ¶ problem is not browser specific. I'll try and test this if I get time by making a database that can try several different length URLs at once.

Posted

Hi

Im using Lotus 6.5. After getting rid of the -->, result still sort of the same

'A Travel Request/ Report had been made and require your attention.Please proceed to 'localhost/fmi/iwp' 'Travel Request and Report D'

'I had similar problems until I changed over to using the hex codes. Since you're also having trouble with the line breaks, maybe you could try the hexadecimal swap function I linked to earlier.'

Hi David, i saw the thread but sorry i do not understand how it actually works..

Thanks a lot..

Kelvin

Posted

Kelvin--

The SendURL script step creates a URL that gets pushed out to the OS, which interprets it like every other URL it receives. That means, if you have a standard http URL, the OS triggers the application that the client machine has set as its browser (in my case, Firefox); if you have a mailto URL, it goes through the browser settings to determine the preferred email client, and passes the URL through to that program. So far, so good.

However, certain characters are defined by the W3 organization to be special characters in a URL. These include the forward slash (/), the ampersand (&), and the question mark (?), among others. This was why you were swapping those characters with the dummy text that Sam suggested. Non-alphanumeric characters (such as the carriage return and the tab) are also technically not allowed in URLs, although many browsers and email clients seem to handle them mostly okay.

It is possible, though, to include these characters (and many others) in a strict URL by following an agreed-upon convention, which is to convert the nasty characters into their hexadecimal code equivalents, which is what the function I wrote does. Thus, for example the "/" becomes "%2F". You've probably seen this sort of conversion in URLs on the address bar of your browser.

So, my function looks for all those characters that might raise trouble in a URL and replaces them with the hex codes. When you push the result out as a URL, your browser knows to convert them back into their ASCII character values, resulting in more of what you asked for.

I hope this helps.

David

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