2015-01-27 2 views
1

나는 어디에서나 보았으며 대부분의 응답은 이메일 주소로 사용자의 계정을 확인하는 것과 관련되어 있습니다. 나는 이미 그것을 가지고있다.PHP/SQL을 사용하여 내 이메일 주소를 제공하고 웹 메일을 설정하는 방법은 무엇입니까?

그러나 사용자가 전자 메일 계정에 등록 할 수있는 방법을 제공하고 싶습니다.

계정을 등록하기 위해 example.com에 가서 계정을 등록하면 [email protected]이라는 전자 메일이 수신되고받은 편지함/보낼 편지함 폴더를보고 메일을 보냅니다. 사이트의 다른 사용자에게 메시지를 보내는 대신 어디서나 사용할 수 있습니다. 몇 가지 도메인을 갖고 싶습니다.

전용 서버 또는 루트 액세스 권한이 없지만 cPanel 및 액세스 권한이있어 웹 서비스와 관련이 있습니다. 무제한 이메일/외부 클라이언트, 도메인, 하위 도메인, 대역폭, 스토리지 등을 사용할 수있는 능력. 그래서 설정해야 할 특정 항목에 대한 제한이있을 것이라고 생각하지 않습니다.

받은 편지함/보낼 편지함에 액세스 할 때 PHP를 사용하여 이메일을 등록하려면 어떻게해야합니까?

나는 이것을 직접 만들어서 내 웹 사이트에서 구현할 수 있으므로 RoundCube 또는 다른 유사한 웹 메일 서비스를 사용하지 마십시오.

+0

cPanel 액세스 만있는 경우 전자 메일 계정을 추가 할 수있는 유일한 방법 일 수 있으며 프로그래밍 방식으로 만들 수는 없습니다. – SeinopSys

+0

@ DJDavid98에서 지적했듯이 문제는 메일 서버에받은 편지함을 만드는 것입니다. SMTP/POP3 또는 IMAP을 사용하여받은 편지함에 액세스하고 메일을 보내고받을 수 있습니다. 이 모든 프로토콜은 PHP에서 지원합니다. –

+1

스팸 발송자가 계정을 만들 때까지 얼마나 걸립니까? iP가 블랙리스트에 올라 있습니까? –

답변

1

그 프로그램의 이메일 계정을 만들 수 100 % 내 작업 라이브 프로젝트 여기

include("xmlapi.php"); //XMLAPI cpanel client class 
// Default whm/cpanel account info 

$ip = ""; // should be server IP address or 127.0.0.1 if local server 
$account = "";// cpanel user account name 
$passwd = '';// cpanel user password 
$port =2083;// cpanel secure authentication port unsecure port# 2082 

$email_domain = "";// email domain (usually same as cPanel domain) 
$email_quota = 50; // default amount of space in megabytes 

/*************End of Setting***********************/ 

$xmlapi = new xmlapi($ip); 

$xmlapi->set_port($port); //set port number. cpanel client class allow you to access WHM as well using WHM port. 

$xmlapi->password_auth($account, $passwd); // authorization with password. not as secure as hash. 

// cpanel email addpop function Parameters 
$call = array(domain=>$email_domain, email=>$email_user, password=>$email_pass, quota=>$email_quota); 

//$xmlapi->set_debug(1);//output to error file set to 1 to see error_log. 

// making call to cpanel api 
$result = $xmlapi->api2_query($account, "Email", "addpop", $call); 

// cpanel email fwdopt function Parameters 

$dest_email="";// if specified by user in the form 

$call_f = array(domain=>$email_domain, email=>$email_user, fwdopt=>"fwd", fwdemail=>$dest_email); 
$result_forward = $xmlapi->api2_query($account, "Email", "addforward", $call_f); //create a forward if you want 


if ($result->data->result == 1){ 
    $msg = $email_user.'@'.$email_domain.' account created'; 

중 하나에서 아래의 코드를 찾아주십시오 클래스 파일입니다 xmlapi.php

0

$ email_quota = 50; // 기본 공간 (메가 바이트 단위)

관련 문제