Hi, as far as I know, to be able to send a contact form, you need the PHP mail() function. As I don't have PHP installed, is there some other solution to do it ?
Hi, as far as I know, to be able to send a contact form, you need the PHP mail() function. As I don't have PHP installed, is there some other solution to do it ?
use a different language, like asp.
But then you need .net installed.
Aleca, x10's servers do have both php and mono's .net installed.
Subtle
I once heard of a way to send emails using javascript, but that's about as secure writing your email address, so probably slightly pointless![]()
I can customise your phpBB board. Send me a PM.
lynxphp - info, tutorials and scripts
"A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."
There is no way of sending an email without use of a server. You may be able to use AJAX to connect to a server, but not by JavaScript alone. The best you can do without a server is a mailto form, which uses the basic maito syntax:
This creates a mailto link which opens up the clients email client to send the message, using the email you supplied in the form (ex: outlook).HTML Code:<html> <body> <form method="get" action="mailto:youremailaddress@gmail.com"enctype="text/plain"> <input type="text" name="subject" value="subject..."/><br /> <textarea name="body" />Type your message here...</textarea><br /> <input type="reset" value="Reset" /> <input type="submit" value="Send" /> </form> </body> </html>
Last edited by Twinkie; 09-22-2009 at 06:50 PM.
or use an external smtp provider...
Edit:
I have a script that monitors file activity in a folder. If a file is accessed it triggers the script. THe files are accessed via an abyss webserver on the same machine and then the email is sent automatically.
Edit:
don't ask me why...
Last edited by allofus; 09-22-2009 at 08:22 PM. Reason: Automerged Doublepost
If you can't use PHP MAIL, then using a SMTP method is your only other option that I know of. But unfortunately I don't know how to do it.
kkenny - retired.
-Became a Moderator/Staff Member on 4/23/08
-Became Senior Mod on 8/28/08
-Became Account Manager on 10/18/08
-Left Staff and X10 in 2009.
Thanks for all your suggestions but I barely know a little PHP, I won't dear approach ASP)
I searched the web a little and discovered the remotely hosted forms. I have to choose between http://www.freedback.com and http://www.123contactform.com. Both are free, Freedback has some ads and 123ContactForm requires a backlink. I think one of them will save my day :D
there is a phpform generator in the softaculous installer on x10.
If you are hosting with x10 you have all you need to host this yourself.
go to your cpanel and take a look at the installer software. The form generator is easy to use and you will maybe learn a few things from seeing the coding it provides.
If you use X10 host then you can do a html form that mails it via php...
Copy and paste below in notepad, save it as "sendresults.php"
Then your HTML form, I placed an example below of something you could do...PHP Code:<?php
//--------------------------Set these paramaters--------------------------
// Subject of email sent to you.
$subject = 'form results';
// Your email address. This is where the form information will be sent.
$emailadd = 'youremail@yourdomain.com';
// Where to redirect after form is processed.
$url = 'http://www.yourdomain.com/confirmation.html';
// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';
// --------------------------Do not edit below this line--------------------------
$text = "results from form:\n\n";
$space = ' ';
$line = '
';
foreach ($_POST as $key => $value)
{
if ($req == '1')
{
if ($value == '')
{echo "$key is empty";die;}
}
$j = strlen($key);
if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
}
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>
Then you would click "send" it would send your form to your email, and redirect the user to "confirmation.html"HTML Code:<form action="http://www.yourdomain.com/sendresults.php" method="post"> <input type="text" name="name"> <input type="submit" value="Send"> </form>
If your server doesn't host php, you can use an x10 host to host the "sendresults.php" and host your html on your html site...