Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I made a little web page to collect multiple choice answers from students. It is just a collection of text box inputs and a "Send Form" button at the bottom. Later on I use python to parse the results.
When I try it on my laptop, "Send Form" causes Thunderbird email to open, all the data in there, I just click "send" and it's sent. Works great, even though it is very primitive!
When I do that on my phone, things are different. I get "the page can't be opened because the url is invalid"
The top of the form part of the web page looks like this:
The mailto: URI is going to activate the default email setup on the device. It works on the laptop because you have email configured on the laptop.
Apparently, email is not configured on the phone, so the phone doesn't know what to do with the mailto: URI.
Typically the action of a form is a script on the server. That script then processes the data in the form. One of the things such a script can do is send an email. I often have the script update a database with the form data. The script can be a bash script, perl, PHP, python, etc.
Code:
action="/path/to/somescript"
Using a server-side script removes the dependency on the client-side configuration.
Thanks, but the thing is, I need to make this work for all the students' phones, not just my phone.
I looked in the settings on my phone, but I can't find setting to do this.
We tried the web page on a Win 10 computer. A click on the 'send form' button brought up a window. Basically you just tell Windows your email and your email password, and it works.
There must be something like that for mobiles, whatever os, because this is a very common thing.
When you do that in Windows 10, I believe that's effectively setting up the email client on the PC in order for the mailto:// URI to work.
Does it work on a phone that does have email already setup?
Again, to remove any dependency on the device or browser being used, call a server-side script to process the form data and email it instead. FormMail is a free perl script that works very well.
I tried downloading Firefox for mobile phones. When I clicked send, it asked me what mail program I wanted to open, so I clicked qqmail.
It opened OK, with my email and subject inserted, but NO DATA!
Thanks for the link, I've downloaded it. Now I'll try and get it to work!
I think I will have to find a new host for my little web page, this one was very cheap, but they don't help at all.
Quote:
Necessary Variables:
--------------------
$mailprog = '/usr/lib/sendmail -i -t';
For example, I wonder where they keep this? The server says it is 'Windows 2008'
Ahh. Can't help you there. You'll need to find a Windows forum, and probably a different email script.
FormMail might work on a Windows server running perl, but I don't know.
Your hosting company should also be a good place to get help.
Never heard of Google Forms, but thanks for the tip! I'll look it up.
Being in China does make google somewhat difficult. The government here wants to have control over all information which is made public. It is just the Chinese way. They've been doing this for 5000 years at least! Google refused to allow the government to censor their content. Google left Beijing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.