drewhiggins Posted November 28, 2006 Share Posted November 28, 2006 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<?phpif(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 13What 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 More sharing options...
Maxraid Posted November 28, 2006 Share Posted November 28, 2006 Is the page running on a hosted server or your own, because it can very well be that the mail function is disabled, put im not a expert on this 8) Link to comment https://forums.phpfreaks.com/topic/28716-php-mailing-issue/#findComment-131730 Share on other sites More sharing options...
drewhiggins Posted November 29, 2006 Author Share Posted November 29, 2006 It runs on a hosted server not my own.Thanks Link to comment https://forums.phpfreaks.com/topic/28716-php-mailing-issue/#findComment-131877 Share on other sites More sharing options...
drewhiggins Posted November 29, 2006 Author Share Posted November 29, 2006 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 More sharing options...
doni49 Posted November 29, 2006 Share Posted November 29, 2006 Don't you have access to an SMTP server via your ISP? If so, use IT. If not, then you can out-source your mail services.You can get email service (which includes the use of an SMTP server) for $20 a year at www.fusemail.com. Link to comment https://forums.phpfreaks.com/topic/28716-php-mailing-issue/#findComment-131922 Share on other sites More sharing options...
drewhiggins Posted November 29, 2006 Author Share Posted November 29, 2006 I have access to GMail. Link to comment https://forums.phpfreaks.com/topic/28716-php-mailing-issue/#findComment-131936 Share on other sites More sharing options...
fert Posted November 29, 2006 Share Posted November 29, 2006 you can upload a costum php.ini file to your server and that might work. Link to comment https://forums.phpfreaks.com/topic/28716-php-mailing-issue/#findComment-131947 Share on other sites More sharing options...
drewhiggins Posted November 29, 2006 Author Share Posted November 29, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.