0

嗨,我在覆盖面板中有一个联系表单,提交操作如下所示。一旦我提交到 email.php,我会从我的 php 文件中收到成功,但我没有在我的收件箱或垃圾邮件中收到邮件。我正在使用gmail接收邮件,php也可以在下面看到:

              items:[
                {
                    xtype:'button',
                    text: 'Submit',
                    ui: 'action-round',
                    handler: function(){
                     var contactUsComment = Ext.getCmp('contactUsForm').getValues();


                Ext.Ajax.request({
                        url: 'email.php',
                        params : contactUsComment,
                        success: function(response){
                            var text = response.responseText;
                            Ext.Msg.alert('Success', text); 
                        }
                       });


            <?php $name = $_POST['name'];
            $email = $_POST['email'];
            $message = $_POST['message'];
            $formcontent="From: $name \n Message: $message";
            $recipient = "myGmailHere";
            $subject = "Contact Form";
            $mailheader = "From: $email \r\n";
            mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
             echo "Thank You!";
              ?>
4

0 回答 0