Jump to content

MailScript Failing


PhilipK

Recommended Posts

Hey everyone,

 

I'm having trouble with a simple mail script. I will start with the jQuery which sends a post.

 

$("#email").click(function () {

var usersemail = $("#user-email").val() ;

$.post("mailform.php", { message: 'feedback', email: 'usersemail' } );

 }); 
});	

 

Next is the php file mailform.php

 

<?php
//The email of the sender
$email = $_POST['email'];
//The message of the sender
$message = $_POST['message'];
//The subject of the email
$subject = "Fanshawe Student Success";
$extra = $email."\r\nReply-To: ".$email."\r\n";
mail($email,$subject,$message,$extra);
?>

 

Not sure why this isn't working?

 

Here is a live version of the App if you would rather test it.

 

http://philipk.ca/Interactive-survey/index.html

 

and here is the php page.

 

http://philipk.ca/Interactive-survey/scripts/mailform.php

 

 

Link to comment
https://forums.phpfreaks.com/topic/241891-mailscript-failing/
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.