2013-07-20 1 views
4

PHP 메일()을 사용하는 웹 사이트를 설정했습니다. http : //에서 스크립트를 실행하면 성공적으로 실행될 수 있지만 https로 전환하면 // 작동하지 않습니다! 나는 Godaddy를 사용하여 호스팅하고 인증서를 구입했습니다. php.ini 파일에 아무것도 설정하지 않아도되는지 잘 모르겠습니다. 내 mailscript은 다음과 같습니다mail() on https

$from_respondent_email = "[email protected]" ; 
$headers_respondent_email = "From: $from_respondent_email"; 
$subject_respondent_email = "Technical Support Request"; 
$body_respondent_email = "We received a support ticket from mydomain.com:\n\n"; 
$body_respondent_email .= "Test block of text"; 
$send = mail("[email protected]", $subject_respondent_email, $body_respondent_email, $headers_respondent_email); 
+1

'작동하지 않습니다'를 정의합니다. 오류가 없습니까? https가 http와 동일한 vhost 설정을 가리키고 있습니까? – tlenss

+2

그냥 팁,'mail()'을 사용하지 마십시오. 그것은 거의 모든 공급자에 의해 트리거되어 정크 폴더로 전송됩니다. – VladHQ

+1

http://stackoverflow.com/questions/712392/send-email-using-gmail-smtp-server-from-php-page – Tom

답변

0
$to ="[email protected]"; 
$subject = "Technical Support Request"; 
$message = "We received a support ticket from mydomain.com:\n\n"; 
$from = "[email protected]"; 
$headers = "From: $from_respondent_email"; 
mail($to,$subject,$message,$headers); 

이보십시오. 작동 할거야. 내 웹 사이트 및 작업에서 이것을 사용했습니다.

+0

이것과 제가 한 일의 유일한 차이점은 먼저 변수를 변수로 두는 것입니다. 나는이 변화를 시도하고 아무런 차이가 없다. 다시 말하지만, http : // 사이트에있을 때 이메일이 문제없이 전송됩니다. 나는 매번 이메일을받을 것이다. 내가하는 모든 일은 https : //로 전환 한 다음 물건을받지 못할 것입니다. 말도 안돼. –

+0

스팸 또는 정크 폴더를 확인하십시오, 귀하의 이메일이 거기있을 것입니다 :) –