Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > !!!ช่วยด้วยครับ พอดีผมเขียนเว็บด้วย Adobe Muse แล้วติดปัญหาหน้า Contac ครับ ฟอร์มที่ส่งข้อมูล ไปที่Email มันส่งไม่ผ่านครับ



 

!!!ช่วยด้วยครับ พอดีผมเขียนเว็บด้วย Adobe Muse แล้วติดปัญหาหน้า Contac ครับ ฟอร์มที่ส่งข้อมูล ไปที่Email มันส่งไม่ผ่านครับ

 



Topic : 126361



โพสกระทู้ ( 19 )
บทความ ( 0 )



สถานะออฟไลน์




รูปภาพหน้า contac


ช่วยด้วยครับ พอดีผมเขียนเว็บด้วย Adobe Muse แล้วติดปัญหาหน้า Contac ครับ ฟอร์มที่ส่งข้อมูล ไปที่Email มันส่งไม่ผ่านครับ
ไม่รู้ว่าต้องแก้ไขอย่างไรครับ เคยมีครั้งหนึ่ง ให้คนอื่นแก้ไขให้ครับ เห็นเขาใช้ php mailer เขาบอกแค่แก้ไขโค้ดบางส่วน แต่ผมก็ไม่รู้ว่าต้องแก้ไขตรงไหน รบกวนผู้รู้ช่วยบอกเป็น step ให้ผมทีครับ ติดปัญหามากๆ เลยครับ รบกวนด้วยครับ

link web หน้าคอนเทค ครับ

http://research.dru.ac.th/fcm/contact.html

-------

รูปนีืเป็นรูปในโปรแกรมที่ทำหน้า contac ครับ

รูปหน้าโปรแกรม



Tag : PHP, MySQL, HTML/CSS, JavaScript, Action Script, CakePHP









ประวัติการแก้ไข
2017-02-12 08:41:37
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2017-02-11 13:41:39 By : bearpanda View : 2409 Reply : 10
 

 

No. 1



โพสกระทู้ ( 5,146 )
บทความ ( 26 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


มันขึ้น ERROR ว่ายังไงหรือเปล่าครับ เอารูปมาให้แปลงเป็นโค้ดไม่ได้หรอกครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-13 19:16:24 By : deawx
 


 

No. 2



โพสกระทู้ ( 19 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 1 เขียนโดย : deawx เมื่อวันที่ 2017-02-13 19:16:24
รายละเอียดของการตอบ ::
https://1drv.ms/u/s!Av7l7xc3kE9JgwfWjIGibhD3XkfW link ไฟล์หน้า contact และ โฟลเดอร์ Script ครับ รบกวนช่วยผมหน่อยนะครับ บอกเป็น Step ให้ที่นะครับ ครั้งหน้าผมจะได้แก้ไขเองได้นะครับ ผมเขียนจากโปรแกรมสำเร็จรูปนะครับ Adobe muse ครับ



ประวัติการแก้ไข
2017-02-13 20:06:37
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-13 20:05:10 By : bearpanda
 

 

No. 3



โพสกระทู้ ( 4,720 )
บทความ ( 8 )



สถานะออฟไลน์


link โหลดไม่ได้ คลิกดาวน์โหลดแล้วไม่มีอะไรเกิดขึ้น /firefox
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-13 22:16:20 By : mr.v
 


 

No. 4



โพสกระทู้ ( 19 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 3 เขียนโดย : mr.v เมื่อวันที่ 2017-02-13 22:16:20
รายละเอียดของการตอบ ::
https://1drv.ms/u/s!Av7l7xc3kE9JgwfWjIGibhD3XkfW
ลองดูอีกทีครับ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-13 23:04:54 By : bearpanda
 


 

No. 5



โพสกระทู้ ( 19 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 3 เขียนโดย : mr.v เมื่อวันที่ 2017-02-13 22:16:20
รายละเอียดของการตอบ ::
https://www.mediafire.com/?rvqhicph5vebjs6
ถ้า link นั้นไม่ผ่าน ลองอันนี้นะครับ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-13 23:07:20 By : bearpanda
 


 

No. 6



โพสกระทู้ ( 4,720 )
บทความ ( 8 )



สถานะออฟไลน์


server คุณมันส่งเมลไม่ได้นี่ครับ
แล้วนี่โค้ด....คราวหน้าพยายามเอาโค้ดที่น่าจะเป็นปัญหามาลงนะครับจะได้มีคนแก้ปัญหาได้ ไม่งั้นไม่มีใครเขาเดาได้หรอกจากภาพเฉยๆน่ะ แล้ว error ก็ถามแล้วไม่บอกว่า error อะไร

Code
<form class="form-grp clearfix grpelem" id="widgetu7723" method="post" enctype="multipart/form-data" action="scripts/form-u7723.php"><!-- none box --> <div class="fld-grp rounded-corners clearfix grpelem" id="widgetu7725" data-required="true"><!-- none box --> <!-- m_editable region-id="editable-static-tag-U7726-BP_infinity" template="contact.html" data-type="html" data-ice-options="disableImageResize,link" --> <label class="fld-label actAsDiv Contact-Form---Field-Title clearfix grpelem" id="u7726-4" data-muse-uid="U7726" data-muse-type="txt_frame" for="widgetu7725_input"><!-- content --><span class="actAsPara" id="u7726-2">Name:</span></label> <!-- /m_editable --> <span class="fld-input NoWrap actAsDiv rounded-corners Contact-Form---Entry-Field clearfix grpelem" id="u7727-4"><!-- content --><input class="wrapped-input" type="text" spellcheck="false" id="widgetu7725_input" name="custom_U7725" tabindex="1"/><label class="wrapped-input fld-prompt" id="widgetu7725_prompt" for="widgetu7725_input"><span class="actAsPara">Enter Name</span></label></span> </div> <div class="fld-grp rounded-corners clearfix grpelem" id="widgetu7736" data-required="true" data-type="email"><!-- none box --> <!-- m_editable region-id="editable-static-tag-U7737-BP_infinity" template="contact.html" data-type="html" data-ice-options="disableImageResize,link" --> <label class="fld-label actAsDiv Contact-Form---Field-Title clearfix grpelem" id="u7737-4" data-muse-uid="U7737" data-muse-type="txt_frame" for="widgetu7736_input"><!-- content --><span class="actAsPara" id="u7737-2">Email:</span></label> <!-- /m_editable --> <span class="fld-input NoWrap actAsDiv rounded-corners Contact-Form---Entry-Field clearfix grpelem" id="u7738-4"><!-- content --><input class="wrapped-input" type="email" spellcheck="false" id="widgetu7736_input" name="Email" tabindex="2"/><label class="wrapped-input fld-prompt" id="widgetu7736_prompt" for="widgetu7736_input"><span class="actAsPara">Enter Email</span></label></span> </div> <!-- m_editable region-id="editable-static-tag-U7734-BP_infinity" template="contact.html" data-type="html" data-ice-options="disableImageResize,link" --> <div class="Contact-Form---Field-Title clearfix grpelem" id="u7734-4" data-muse-uid="U7734" data-muse-type="txt_frame"><!-- content --> <p>Submitting Form...</p> </div> <!-- /m_editable --> <!-- m_editable region-id="editable-static-tag-U7735-BP_infinity" template="contact.html" data-type="html" data-ice-options="disableImageResize,link" --> <div class="clearfix grpelem" id="u7735-4" data-muse-uid="U7735" data-muse-type="txt_frame"><!-- content --> <p>The server encountered an error.</p> </div> <!-- /m_editable --> <!-- m_editable region-id="editable-static-tag-U7724-BP_infinity" template="contact.html" data-type="html" data-ice-options="disableImageResize,link" --> <div class="clearfix grpelem" id="u7724-4" data-muse-uid="U7724" data-muse-type="txt_frame"><!-- content --> <p>Form received!</p> </div> <!-- /m_editable --> <!-- m_editable region-id="editable-static-tag-U7733-BP_infinity" template="contact.html" data-type="html" data-ice-options="disableImageResize,link" --> <button class="submit-btn NoWrap rounded-corners clearfix grpelem" id="u7733-4" data-muse-uid="U7733" data-muse-type="txt_frame" type="submit" value="Submit" tabindex="4"><!-- content --> <div style="margin-top:-18px;height:18px;"> <p>Submit</p> </div> </button> <!-- /m_editable --> <div class="fld-grp rounded-corners clearfix grpelem" id="widgetu7729" data-required="true"><!-- none box --> <!-- m_editable region-id="editable-static-tag-U7730-BP_infinity" template="contact.html" data-type="html" data-ice-options="disableImageResize,link" --> <label class="fld-label actAsDiv Contact-Form---Field-Title clearfix grpelem" id="u7730-4" data-muse-uid="U7730" data-muse-type="txt_frame" for="widgetu7729_input"><!-- content --><span class="actAsPara" id="u7730-2">Message:</span></label> <!-- /m_editable --> <span class="fld-textarea actAsDiv rounded-corners Contact-Form---Entry-Field clearfix grpelem" id="u7731-4"><!-- content --><textarea class="wrapped-input" id="widgetu7729_input" name="custom_U7729" tabindex="3"></textarea><label class="wrapped-input fld-prompt" id="widgetu7729_prompt" for="widgetu7729_input"><span class="actAsPara">Enter Your Message</span></label></span> </div> </form>

contact.html

Code (PHP)
<?php 
/* 	
If you see this text in your browser, PHP is not configured correctly on this hosting provider. 
Contact your hosting provider regarding PHP configuration for your site.

PHP file generated by Adobe Muse CC 2017.0.0.363
*/

require_once('form_process.php');

$form = array(
	'subject' => 'ContactForm Submission',
	'heading' => 'New Form Submission',
	'success_redirect' => '',
	'resources' => array(
		'checkbox_checked' => 'Checked',
		'checkbox_unchecked' => 'Unchecked',
		'submitted_from' => 'Form submitted from website: %s',
		'submitted_by' => 'Visitor IP address: %s',
		'too_many_submissions' => 'Too many recent submissions from this IP',
		'failed_to_send_email' => 'Failed to send email',
		'invalid_reCAPTCHA_private_key' => 'Invalid reCAPTCHA private key.',
		'invalid_reCAPTCHA2_private_key' => 'Invalid reCAPTCHA 2.0 private key.',
		'invalid_reCAPTCHA2_server_response' => 'Invalid reCAPTCHA 2.0 server response.',
		'invalid_field_type' => 'Unknown field type \'%s\'.',
		'invalid_form_config' => 'Field \'%s\' has an invalid configuration.',
		'unknown_method' => 'Unknown server request method'
	),
	'email' => array(
		'from' => '[email protected]',
		'to' => '[email protected]'
	),
	'fields' => array(
		'custom_U7725' => array(
			'order' => 1,
			'type' => 'string',
			'label' => 'Name',
			'required' => true,
			'errors' => array(
				'required' => 'Field \'Name\' is required.'
			)
		),
		'Email' => array(
			'order' => 2,
			'type' => 'email',
			'label' => 'Email',
			'required' => true,
			'errors' => array(
				'required' => 'Field \'Email\' is required.',
				'format' => 'Field \'Email\' has an invalid email.'
			)
		),
		'custom_U7729' => array(
			'order' => 3,
			'type' => 'string',
			'label' => 'Message',
			'required' => true,
			'errors' => array(
				'required' => 'Field \'Message\' is required.'
			)
		)
	)
);

process_form($form);
?>

form-u7723.php

Code (PHP)
<?php 
/* 	
If you see this text in your browser, PHP is not configured correctly on this hosting provider. 
Contact your hosting provider regarding PHP configuration for your site.

PHP file generated by Adobe Muse CC 2017.0.0.363
*/

require_once('form_throttle.php');

function process_form($form) {
	if ($_SERVER['REQUEST_METHOD'] != 'POST')
		die(get_form_error_response($form['resources']['unknown_method']));

	if (formthrottle_too_many_submissions($_SERVER['REMOTE_ADDR']))
		die(get_form_error_response($form['resources']['too_many_submissions']));
	
	// will die() if there are any errors
	check_required_fields($form);
	
	// will die() if there is a send email problem
	email_form_submission($form);
}

function get_form_error_response($error) {
	return get_form_response(false, array('error' => $error));
}

function get_form_response($success, $data) {
	if (!is_array($data))
		die('data must be array');
		
	$status = array();
	$status[$success ? 'FormResponse' : 'MusePHPFormResponse'] = array_merge(array('success' => $success), $data);
	
	return json_serialize($status);
}

function check_required_fields($form) {
	$errors = array();

	foreach ($form['fields'] as $field => $properties) {
		if (!$properties['required'])
			continue;

		if (!array_key_exists($field, $_REQUEST) || ($_REQUEST[$field] !== "0" && empty($_REQUEST[$field])))
			array_push($errors, array('field' => $field, 'message' => $properties['errors']['required']));
		else if (!check_field_value_format($form, $field, $properties))
			array_push($errors, array('field' => $field, 'message' => $properties['errors']['format']));
	}

	if (!empty($errors))
		die(get_form_error_response(array('fields' => $errors)));
}

function check_field_value_format($form, $field, $properties) {
	$value = get_form_field_value($field, $properties, $form['resources'], false);

	switch($properties['type']) {
		case 'checkbox':
		case 'string':
		case 'captcha':
			// no format to validate for those fields
			return true;

		case 'checkboxgroup':
			if (!array_key_exists('optionItems', $properties))
				die(get_form_error_response(sprintf($form['resources']['invalid_form_config'], $properties['label'])));

			// If the value received is not an array, treat it as invalid format
			if (!isset($value))
				return false;

			// Check each option to see if it is a valid value
			foreach($value as $checkboxValue) {
				if (!in_array($checkboxValue, $properties['optionItems']))
					return false;
			}

			return true;

		case 'radiogroup':
			if (!array_key_exists('optionItems', $properties))
				die(get_form_error_response(sprintf($form['resources']['invalid_form_config'], $properties['label'])));

			//check list of real radio values
			return in_array($value, $properties['optionItems']);
	
		case 'recaptcha':
			if (!array_key_exists('recaptcha', $form) || !array_key_exists('private_key', $form['recaptcha']) || empty($form['recaptcha']['private_key']))
				die(get_form_error_response($form['resources']['invalid_reCAPTCHA_private_key']));
			$resp = recaptcha_check_answer($form['recaptcha']['private_key'], $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
			return $resp->is_valid;

		case 'recaptcha2':
			if (!array_key_exists('recaptcha2', $form) || !array_key_exists('private_key', $form['recaptcha2']) || empty($form['recaptcha2']['private_key']))
				die(get_form_error_response($form['resources']['invalid_reCAPTCHA2_private_key']));

			$resp = recaptcha2_check_answer($form['recaptcha2']['private_key'], $_POST["g-recaptcha-response"], $_SERVER["REMOTE_ADDR"]);
			return $resp["success"];

		case 'email':
			return 1 == preg_match('/^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i', $value);

		case 'radio': // never validate the format of a single radio element; only the group gets validated
		default:
			die(get_form_error_response(sprintf($form['resources']['invalid_field_type'], $properties['type'])));
	}
}

/**
 * Returns an object with following properties:
 *	"success": true|false,
 *	"challenge_ts": timestamp,  // timestamp of the challenge load (ISO format yyyy-MM-dd'T'HH:mm:ssZZ)
 *	"hostname": string,         // the hostname of the site where the reCAPTCHA was solved
 *	"error-codes": [...]        // optional; possibe values:
 *									missing-input-secret - The secret parameter is missing
 *									invalid-input-secret - The secret parameter is invalid or malformed
 *									missing-input-response - The response parameter is missing
 *									invalid-input-response - The response parameter is invalid or malformed
 */
function recaptcha2_check_answer($secret, $response, $remoteIP) {
	$url = 'https://www.google.com/recaptcha/api/siteverify';
	$data = array(
		'secret' => $secret,
		'response' => $response,
		'remoteip' => $remoteIP
	);

	$options = array(
		'http' => array(
			'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
			'method'  => 'POST',
			'content' => http_build_query($data)
		)
	);
	
	$context = stream_context_create($options);
	$contents = file_get_contents($url, false, $context);
	if ($contents === FALSE) {
		die(get_form_error_response($form['resources']['invalid_reCAPTCHA2_server_response']));
	}

	$result = (array) json_decode($contents);
	return $result;
}

function email_form_submission($form) {
	if(!defined('PHP_EOL'))
		define('PHP_EOL', '\r\n');

	$form_email = ((array_key_exists('Email', $_REQUEST) && !empty($_REQUEST['Email'])) ? cleanup_email($_REQUEST['Email']) : '');

	$to = $form['email']['to'];
	$subject = $form['subject'];
	$message = get_email_body($subject, $form['heading'], $form['fields'], $form['resources']);
	$headers = get_email_headers($to, $form_email);	

	$sent = @mail($to, $subject, $message, $headers);
	
	if(!$sent)
		die(get_form_error_response($form['resources']['failed_to_send_email']));
	
	$success_data = array(
		'redirect' => $form['success_redirect']
    );
	
	echo get_form_response(true, $success_data);
}

function get_email_headers($to_email, $form_email) {
	$headers = 'From: ' . $to_email . PHP_EOL;
	$headers .= 'Reply-To: ' . $form_email . PHP_EOL;
	$headers .= 'X-Mailer: Adobe Muse CC 2017.0.0.363 with PHP' . PHP_EOL;
	$headers .= 'Content-type: text/html; charset=utf-8' . PHP_EOL;
	
	return $headers;
}

function get_email_body($subject, $heading, $fields, $resources) {
	$message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
	$message .= '<html xmlns="http://www.w3.org/1999/xhtml">';
	$message .= '<head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><title>' . encode_for_form($subject) . '</title></head>';
	$message .= '<body style="background-color: #ffffff; color: #000000; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 18px; font-family: helvetica, arial, verdana, sans-serif;">';
	$message .= '<h2 style="background-color: #eeeeee;">' . $heading . '</h2>';
	$message .= '<table cellspacing="0" cellpadding="0" width="100%" style="background-color: #ffffff;">'; 

	$sorted_fields = array();
	
	foreach ($fields as $field => $properties) {
		// Skip reCAPTCHA from email submission
		if ('recaptcha' == $properties['type'] || 'recaptcha2' == $properties['type'])
			continue;

		array_push($sorted_fields, array('field' => $field, 'properties' => $properties));
	}

	// sort fields
	usort($sorted_fields, 'field_comparer');

	foreach ($sorted_fields as $field_wrapper)
		$message .= '<tr><td valign="top" style="background-color: #ffffff;"><b>' . encode_for_form($field_wrapper['properties']['label']) . ':</b></td><td>' . get_form_field_value($field_wrapper['field'], $field_wrapper['properties'], $resources, true) . '</td></tr>';

	$message .= '</table>';
	$message .= '<br/><br/>';
	$message .= '<div style="background-color: #eeeeee; font-size: 10px; line-height: 11px;">' . sprintf($resources['submitted_from'], encode_for_form($_SERVER['SERVER_NAME'])) . '</div>';
	$message .= '<div style="background-color: #eeeeee; font-size: 10px; line-height: 11px;">' . sprintf($resources['submitted_by'], encode_for_form($_SERVER['REMOTE_ADDR'])) . '</div>';
	$message .= '</body></html>';

	return cleanup_message($message);
}

function field_comparer($field1, $field2) {
	if ($field1['properties']['order'] == $field2['properties']['order'])
		return 0;

	return (($field1['properties']['order'] < $field2['properties']['order']) ? -1 : 1);
}

function is_assoc_array($arr) {
	if (!is_array($arr))
		return false;
	
	$keys = array_keys($arr);
	foreach (array_keys($arr) as $key)
		if (is_string($key)) return true;

	return false;
}

function json_serialize($data) {

	if (is_assoc_array($data)) {
		$json = array();
	
		foreach ($data as $key => $value)
			array_push($json, '"' . $key . '": ' . json_serialize($value));
	
		return '{' . implode(', ', $json) . '}';
	}
	
	if (is_array($data)) {
		$json = array();
	
		foreach ($data as $value)
			array_push($json, json_serialize($value));
	
		return '[' . implode(', ', $json) . ']';
	}
	
	if (is_int($data) || is_float($data))
		return $data;
	
	if (is_bool($data))
		return $data ? 'true' : 'false';
	
	return '"' . encode_for_json($data) . '"';
}

function encode_for_json($value) {
	return preg_replace(array('/([\'"\\t\\\\])/i', '/\\r/i', '/\\n/i'), array('\\\\$1', '\\r', '\\n'), $value);
}

function encode_for_form($text) {
	$text = stripslashes($text);
	return htmlentities($text, ENT_QUOTES, 'UTF-8');// need ENT_QUOTES or webpro.js jQuery.parseJSON fails
}

function get_form_field_value($field, $properties, $resources, $forOutput) {
	$value = $_REQUEST[$field];
	
	switch($properties['type']) {
		case 'checkbox':
			return (($value == '1' || $value == 'true') ? $resources['checkbox_checked'] : $resources['checkbox_unchecked']);
		
		case 'checkboxgroup':
			if (!is_array($value))
				return NULL;

			$outputValue = array();

			foreach ($value as $checkboxValue)
				array_push($outputValue, $forOutput ? encode_for_form($checkboxValue) : stripslashes($checkboxValue));
			
			if ($forOutput)
				$outputValue = implode(', ', $outputValue);

			return $outputValue;
		
		case 'radiogroup':
			return ($forOutput ? encode_for_form($value) : stripslashes($value));
		
		case 'string':
		case 'captcha':
		case 'recaptcha':
		case 'recaptcha2':
		case 'email':
			return encode_for_form($value);

		case 'radio': // never validate the format of a single radio element; only the group gets validated
		default:
			die(get_form_error_response(sprintf($resources['invalid_field_type'], $properties['type'])));
	}
}

function cleanup_email($email) {
	$email = encode_for_form($email);
	$email = preg_replace('=((<CR>|<LF>|0x0A/%0A|0x0D/%0D|\\n|\\r)\S).*=i', null, $email);
	return $email;
}

function cleanup_message($message) {
	$message = wordwrap($message, 70, "\r\n");
	return $message;
}
?>

form_process.php

error มันขึ้นว่า The server encountered an error. ซึ่งคำนี้หาในส่วน php ไม่มีแต่มาเจอใน html
เลยเดาว่ามันรับค่าอะไรส่งไม่สำเร็จมาแล้วแสดงอันนี้
ซึ่งก็หา js ajax อันนี้ไม่เจอเลยไปลองหน้าเว็บจริง เปิด firefox network monitor ดูการส่งการรับข้อมูล
การรับข้อมูลได้มาเป็น
Quote:
{"MusePHPFormResponse": {"success": false, "error": "Failed to send email"}}


เลยลองหา Failed to send email ใน php เจอแค่ในไฟล์ form-u7723.php แล้วมันก็มาจาก array 'failed_to_send_email' => 'Failed to send email',
เลยลองหา failed_to_send_email เจอในไฟล์ form_process.php เท่านั้น มาจากแถวๆบรรทัด 162
Code (PHP)
function email_form_submission($form) {
	if(!defined('PHP_EOL'))
		define('PHP_EOL', '\r\n');

	$form_email = ((array_key_exists('Email', $_REQUEST) && !empty($_REQUEST['Email'])) ? cleanup_email($_REQUEST['Email']) : '');

	$to = $form['email']['to'];
	$subject = $form['subject'];
	$message = get_email_body($subject, $form['heading'], $form['fields'], $form['resources']);
	$headers = get_email_headers($to, $form_email);	

	$sent = @mail($to, $subject, $message, $headers);
	
	if(!$sent)
		die(get_form_error_response($form['resources']['failed_to_send_email']));
	
	$success_data = array(
		'redirect' => $form['success_redirect']
    );
	
	echo get_form_response(true, $success_data);
}

ซึ่งดูจากโค้ดก็ไม่น่ามีปัญหาอะไร หาเหตุไม่ได้ แต่ทางคุณก็น่าจะเขียน debug เวลา development ไว้บ้าง
ตัวอย่าง
http://stackoverflow.com/questions/3186725/how-can-i-get-the-error-message-for-the-mail-function
Code (PHP)
if (!$sent) {
    file_put_contents(__DIR__.'/debug-mail-function-error.txt', print_r(error_get_last(), true)."\n", FILE_APPEND);// @todo debug in development mode only. remove on production mode.
    die(get_form_error_response($form['resources']['failed_to_send_email']));
}

แล้วก็ทดลองแล้วก็เอาผลจาก ไฟล์ debug-mail-function-error.txt มาดู

แต่ผมว่าเมลมันไม่ส่งนั่นแหละ มันมีปัญหาลองเปลี่ยนเมลพวก from, to อะไรพวกนี้ดู.
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-13 23:35:22 By : mr.v
 


 

No. 7



โพสกระทู้ ( 19 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 6 เขียนโดย : mr.v เมื่อวันที่ 2017-02-13 23:35:22
รายละเอียดของการตอบ ::

55

ตอนที่ Export ไปเก็บ หรือ อัพขึ้น Sever มันจะขึ้นตามรูปนะครับ


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-13 23:44:07 By : bearpanda
 


 

No. 8



โพสกระทู้ ( 4,720 )
บทความ ( 8 )



สถานะออฟไลน์


ก็นั่นแหละครับ ที่มันแจ้งขึ้นมามันก็บอกว่าให้เปลี่ยน จริงๆส่งเมลก็น่าจะใช้ phpmailer ไป
แล้วการเปลี่ยนไปใช้ phpmailer จากโปรแกรม muse นี่ผมไม่ทราบครับต้องรอคนที่รู้มาบอก แต่ว่าถ้าแก้โค้ดก็เปลี่ยนตรงที่มัน mail() ฟังก์ชั่นนั่นแหละ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-14 00:17:00 By : mr.v
 


 

No. 9



โพสกระทู้ ( 19 )
บทความ ( 0 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 8 เขียนโดย : mr.v เมื่อวันที่ 2017-02-14 00:17:00
รายละเอียดของการตอบ ::
66
ข้อความเพิ่มเติมครับ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-14 00:25:41 By : bearpanda
 


 

No. 10



โพสกระทู้ ( 4,720 )
บทความ ( 8 )



สถานะออฟไลน์


ตอบความคิดเห็นที่ : 9 เขียนโดย : bearpanda เมื่อวันที่ 2017-02-14 00:25:41
รายละเอียดของการตอบ ::
จริงๆส่งเมลก็น่าจะใช้ phpmailer ไป
แล้วการเปลี่ยนไปใช้ phpmailer จากโปรแกรม muse นี่ผมไม่ทราบครับต้องรอคนที่รู้มาบอก แต่ว่าถ้าแก้โค้ดก็เปลี่ยนตรงที่มัน mail() ฟังก์ชั่นนั่นแหละ

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2017-02-14 00:29:34 By : mr.v
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : !!!ช่วยด้วยครับ พอดีผมเขียนเว็บด้วย Adobe Muse แล้วติดปัญหาหน้า Contac ครับ ฟอร์มที่ส่งข้อมูล ไปที่Email มันส่งไม่ผ่านครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่