Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Using PHP to send mail on plusnet
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: Using PHP to send mail on plusnet
Using PHP to send mail on plusnet
20-12-2008 2:17 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am trying to post to a PHP page on my plusnet website so it send me an email when the form has been filled out. The only issue is that I keep getting
Method Not Allowed
The requested method POST is not allowed for the URL...
How can I get this to work on Plusnet as I use my webspace to develope sites that I play with....
Anyone know?
Pete
Method Not Allowed
The requested method POST is not allowed for the URL...
How can I get this to work on Plusnet as I use my webspace to develope sites that I play with....
Anyone know?
Pete
6 REPLIES 6
Re: Using PHP to send mail on plusnet
20-12-2008 2:23 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Based on the error you are receiving, the file has either been uploaded to, or your are calling the file on our Homepsages serverv.
Any PHP you have needs to be uploaded to our CCGI service, which is a seperate address.
A guide to using our CGI service can be found on the following pages.
http://www.plus.net/support/webspace/cgi_php/cgi_guide.shtml
Any PHP you have needs to be uploaded to our CCGI service, which is a seperate address.
A guide to using our CGI service can be found on the following pages.
http://www.plus.net/support/webspace/cgi_php/cgi_guide.shtml
Re: Using PHP to send mail on plusnet
20-12-2008 2:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi
Thanks for getting back so quickly.
I have followed ALL the rules for the ccgi and I get dispalyed 'The Webpage cannot be found'. I have ccgi activated and I am using the post action of http://ccgi.username.plus.com/sendmail.php
Any ideas please
Pete
Thanks for getting back so quickly.
I have followed ALL the rules for the ccgi and I get dispalyed 'The Webpage cannot be found'. I have ccgi activated and I am using the post action of http://ccgi.username.plus.com/sendmail.php
Any ideas please
Pete
Re: Using PHP to send mail on plusnet
20-12-2008 3:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
OK!
I can get to the php file now... shame I can't spell!!!
anyway...
Now I get
Execution of (cgi-bin/sendmail.php) is not permitted for the following reason:
Script is not executable. Issue 'chmod 755 filename'
I just want the PHP to send me posted info as an email. The code I have is:
<?php
//--------------------------Set these paramaters--------------------------
// Subject of email sent to you.
$subject = 'Results from Contact form';
// Your email address. This is where the form information will be sent.
$emailadd = 'me@myplusnetmail.plus.com';
// Where to redirect after form is processed.
$url = thankyou.htm;
// 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 == '0')
{
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.'">';
?>
I can get to the php file now... shame I can't spell!!!
anyway...
Now I get
Execution of (cgi-bin/sendmail.php) is not permitted for the following reason:
Script is not executable. Issue 'chmod 755 filename'
I just want the PHP to send me posted info as an email. The code I have is:
<?php
//--------------------------Set these paramaters--------------------------
// Subject of email sent to you.
$subject = 'Results from Contact form';
// Your email address. This is where the form information will be sent.
$emailadd = 'me@myplusnetmail.plus.com';
// Where to redirect after form is processed.
$url = thankyou.htm;
// 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 == '0')
{
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.'">';
?>
Re: Using PHP to send mail on plusnet
20-12-2008 3:14 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
A hint is in the bit you have included in bold.
You need to ensure your PHP files has the correct permissions.
You need to ensure your PHP files has the correct permissions.
Re: Using PHP to send mail on plusnet
20-12-2008 3:59 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
P Richardson
FANTASTIC !!!!! It's working and I am well happy with the results..
AND SO QUICK TOO
Pete
FANTASTIC !!!!! It's working and I am well happy with the results..
AND SO QUICK TOO
Pete
Re: Using PHP to send mail on plusnet
20-12-2008 8:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Happy to help.
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: Using PHP to send mail on plusnet