2016-07-19 4 views
0

이메일 도메인을 확인하거나 API를 통해 인증을 보내는 방법이 있습니까? 내 고객이 내 웹 사이트에서 이메일 캠페인을 만들 때 이메일 도메인을 확인하고 싶습니다.PHP Amazon SES 이메일 확인

PHP AWS SDK v2를 사용하고 있습니다. 이메일 도메인 확인을위한 AWS SES에서

$mailbox_email = '[email protected]'; 

$aws_client = \Aws\Common\Aws::factory(array(
    'region' => 'eu-west-1', 
    'credentials' => array(
    'key'   => AWS_ACCESS, 
    'secret' => AWS_SECRET 
) 
)); 

$ses_client = $aws_client->get('Ses'); 

$ses_result = $ses_client->verifyEmailIdentity(['EmailAddress' => $mailbox_email]); 

// Set bounces, complaint, deliveries notification 
$ses_client->setIdentityNotificationTopic(array(
'Identity' => $mailbox_email, 
'NotificationType' => 'Bounce', 
'SnsTopic' => 'arn:aws:sns:eu-west-1:9:ses_bounces' 
)); 

$ses_client->setIdentityNotificationTopic(array(
'Identity' => $mailbox_email, 
'NotificationType' => 'Complaint', 
'SnsTopic' => 'arn:aws:sns:eu-west-1:9:ses_complaints' 
)); 

$ses_client->setIdentityNotificationTopic(array(
'Identity' => $mailbox_email, 
'NotificationType' => 'Delivery', 
'SnsTopic' => 'arn:aws:sns:eu-west-1:9:ses_deliveries' 
)); 

$ses_client->SetIdentityFeedbackForwardingEnabled(array(
'Identity' => $mailbox_email, 
'ForwardingEnabled' => false 
)); 

답변

0

http://docs.aws.amazon.com/aws-sdk-php/v2/guide/service-ses.html 당신은 DNS 설정을하거나 도메인 루트 53에 제외 API를 사용하여 수행 할 수없는 DKIM 또는 TXT 레코드를 추가 할 필요가 당신은 계정에 대한 액세스 권한이 . 이것은 이메일 도메인을 확인하는 방법입니다. 따라서 전자 메일 도메인 확인은 수동으로 수행해야합니다.

http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html

는 당신은 AWS SES API를 사용하여 이메일 주소를 확인할 수 있습니다.

http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html

+0

안녕하세요, 저는이 문서를 읽어 http://docs.aws .amazon.com/s es/latest/DeveloperGuide/verify-email-addresses.html하지만 전자 메일을받지 못하면 다시 전자 메일 확인을 다시 보내는 방법을 찾을 수 없습니다. – tonoslfx

+0

콘솔이나 API에서 다시 보내시겠습니까? – error2007s

+0

API를 통해 이메일 확인을 다시 보내려합니다. – tonoslfx

0

이메일 확인

 //connect Amazon SES 
    $ses = new SimpleEmailService($this->AccessKey, $this->SecretKey,'email.eu-west-1.amazonaws.com'); 

    //Get verified mail list 
    $list = $ses->listVerifiedEmailAddresses(); 
    //verify email 
    $confirm = $ses->verifyEmailAddress('[email protected]'); 

설정 항목 후 이메일 확인

$ses = Aws\Ses\SesClient::factory([ 
      'credentials' => [ 
       'key' => $this->AccessKey, 
       'secret' => $this->SecretKey, 
      ], 
      'version' => 'latest', 
      'region' => 'eu-west-1' 
     ]); 


     $ses_client = $ses->setIdentityNotificationTopic(array(
      'Identity' => $email, 
      'NotificationType' => 'Bounce', 
      'SnsTopic' => 'arn:aws:sns' 
     )); 

     $ses_client = $ses->setIdentityNotificationTopic(array(
      'Identity' => $email, 
      'NotificationType' => 'Complaint', 
      'SnsTopic' => 'arn:aws:sns' 
     ));