Jump to content

PHP Mailing issue


drewhiggins

Recommended Posts

Hi everyone. New user here and new PHPer, so please forgive me for my lack of knowledge.

I have got a script which goes like this to send an email:

First is the contact.htm page then second is the mailer.php



<form method="POST" action="mailer.php">
  <input type="text" name="name" size="19"><br>
  <br>
  <input type="text" name="email" size="19"><br>
  <br>
  <textarea rows="9" name="message" cols="30"></textarea>
  <br>
  <br>
  <input type="submit" value="Submit" name="submit">
</form>






AND below is the mailer.php







<?php
if(isset($_POST['submit'])) {

$to = "[email protected]";
$subject = "Form Tutorial";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";

echo "Data has been submitted to $to!";
mail($to, $subject, $body);

} else {

echo "blarg!";

}
?>




And I get this error..

Data has been submitted to [email protected]!
Warning: mail() has been disabled for security reasons in /home/zendurl/public_html/u2mofo/mailer.php on line 13


What does it mean and how do I go about fixing it, or is there an alternative?
Link to comment
https://forums.phpfreaks.com/topic/28716-php-mailing-issue/
Share on other sites

Actually, I ran a cool info.php script I found and the MAIL() function said it was disabled.

Anyone know a good FREE host (with or without ads and fast) where this isn't disabled so I can run my script? It's a good one, but were there any mistakes with the one I wrote?

Thanks again.
Link to comment
https://forums.phpfreaks.com/topic/28716-php-mailing-issue/#findComment-131879
Share on other sites

How do I do that? Would a free host let me upload one?

Or do you have an example one which could be used because I really want to do this.

The reason is that on my web page it has a link to mailto:[email protected] and if someone doesn't have an email client built-in or doesn't want to use it because they don't like it. It is kind of sucky as well.

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/28716-php-mailing-issue/#findComment-131972
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.