PHP에서 전자 메일을 보내거나 받으려면 이메일을 보내 almyak을 어떻게 사용할 수 있습니까?

StackOverflow https://stackoverflow.com/questions/5485688

  •  14-11-2019
  •  | 
  •  

문제

"NoFollow"> 이메일 yak 이메일을 보내고 PHP로 이메일을 보내고 받고 싶습니다.이거 가능합니까?그렇다면 어떻게해야합니까?

도움이 되었습니까?

해결책

PHP 에서이 작업을 수행하려는 이유를 확신 할 수는 없지만 '전자 메일'수동 페이지 이메일 yak 프로젝트에서

PHPS 컬 Extension 적절한 헤더와 PHPS 네이티브로 HTTP 요청을 만들어야합니다. json_encode() 함수 보내기 위해 보내는 데이터를 직렬화합니다. jonasjohn.de의 jonasjohn.de 에서 정말 간단한 컬 예제가는 :

함수 curl_download ($ URL) {

// is cURL installed yet?
if (!function_exists('curl_init')){
    die('Sorry cURL is not installed!');
}

// OK cool - then let's create a new cURL resource handle
$ch = curl_init();

// Now set some options (most are optional)

// Set URL to download
curl_setopt($ch, CURLOPT_URL, $Url);

// Set a referer
curl_setopt($ch, CURLOPT_REFERER, "http://www.example.org/yay.htm");

// User agent
curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");

// Include header in result? (0 = yes, 1 = no)
curl_setopt($ch, CURLOPT_HEADER, 0);

// Should cURL return or print out the data? (true = return, false =
.

인쇄) CURL_SETOPT ($ CH, CURLOPT_RETURNTRANSFER, TRUE);

// Timeout in seconds
curl_setopt($ch, CURLOPT_TIMEOUT, 10);

// Download the given URL, and return output
$output = curl_exec($ch);

// Close the cURL resource, and free system resources
curl_close($ch);

return $output; 
.

}

다른 팁

이메일 YAK는 GET, POST 및 JSON을 사용합니다.확실히 PHP와 통합 할 수 있습니다.

http://docs.emailyak.com/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top