Zend_Mail_Transport_Smtp
에 Amazon SES key, secret + smtp 주소를 사용하는 방법은 무엇입니까? 그것은 말합니다 : Must issue a STARTTLS command first
다음을 시도하는 동안.Zend_Mail_Transport_Smtp 어댑터에 Amazon SES key, secret + smtp 주소를 사용하는 방법은 무엇입니까?
/*
Reference in C#: http://sesblog.amazon.com/
String username = "SMTP-USERNAME"; // Replace with your SMTP username.
String password = "SMTP-PASSWORD"; // Replace with your SMTP password.
String host = "email-smtp.us-east-1.amazonaws.com";
int port = 25;
*/
public static function sendEmail($to, $subject, $body) {
$config = array(
'aws_key' => 'yourkey',
'aws_secret' => 'yourkeysecret',
));
//
//echo 0 > /selinux/enforce
//$tr = new Zend_Mail_Transport_Smtp('smtp.belgacom.be');// works - for local
//$tr = new Zend_Mail_Transport_Smtp('out.telenet.be'); // works - for office
//
$tr = new Zend_Mail_Transport_Smtp(
'email-smtp.us-east-1.amazonaws.com'); // DOES not work
Zend_Mail::setDefaultTransport($tr);
$mail = new Zend_Mail();
$html = self::setupEmail($body);
$mail->setBodyHtml($html);
$mail->setFrom('[email protected]', 'memy.com');
$mail->addTo($to, 'EXAMPLE');
$mail->setSubject($subject);
$mail->send();
}
후속 :
// Wild guess
$config = array(
'aws_key' => 'yourkey',
'aws_secret' => 'yourkeysecret',
));
$tr = new Zend_Mail_Transport_Smtp('email-smtp.us-east-1.amazonaws.com',
$config);
최종 후속 : 1) 아마존 SES SMTP 인터페이스를 사용하여 이메일을 보내려면
단계를, 다음이 필요합니다 :
AWS 계정.
Amazon SES 프로덕션 액세스, 많은 양의 이메일을 보내려는 경우. 자세한 내용은 프로덕션 액세스 요청을 참조하십시오.
- 그 일을 한 후, 그들은
send 10000 emails per 24 hour period
수 있습니다 - 당신이 확인한
이메일 주소 제 5 이메일/-이 빠르게 미만 24시간처럼
을 활성화 Amazon SES가 있습니다. 자세한 내용은 전자 메일 주소 확인을 참조하십시오.
는 - 그
에 의해 유효성을 검사하는 동안이 걸립니다 - 이것은 여전히 후 24 때가 아직
는 SMTP 인터페이스의 호스트 이름과 포트 번호
를 확인하지 않습니다. 호스트 이름은 email-smtp.us-east-1.amazonaws.com입니다. 포트 번호는 연결 방법에 따라 다릅니다. 자세한 내용은 SMTP 끝점에 연결을 참조하십시오.- 다른 매우 중요합니다, 당신은 AWS 관리 콘솔에서 얻을
의 SMTP 사용자 이름과 암호를 실패했다. 자세한 내용은 SMTP 자격 증명을 참조하십시오.
TLS (전송 계층 보안)를 사용하여 통신 할 수있는 클라이언트 소프트웨어.
2 단계) 나는 그것을 보여줍니다이 관리 콘솔에서, 그 위에했을 : 의미
Status:
pending verification (resend)
Please check your inbox for an email to this address, and click on the link provided to complete verification. If you did not receive this email, please click resend.
Domain verification in AWS:
Status:
pending verification (resend)
Please check your inbox for an email to this address, and click on the link provided to complete verification. If you did not receive this email, please click resend.
, 그들은 72 시간
3 단계) 내에서 일을 할 것입니다 외부 어댑터를 사용하지 않고 $ config를 수정하십시오 (ZF로 이동하지 않음)
$config = array(
'auth' => 'login',
'username' => 'SES key',
'password' => 'SES secret',
));
$tr = new Zend_Mail_Transport_Smtp('email-smtp.us-east-1.amazonaws.com',
$config);
조금 모호) 무엇이입니다 정확한 오류가 발생 했습니까? – dom
@YumYumYum 내 편집을 확인하십시오 ... – dom
1)이 http://docs.amazonwebservices.com/ses/latest/DeveloperGuide/SMTP.html?r=9608에 언급 된 모든 작업을 수행했습니다. 2) 지금부터 사용하고 있습니다. SES SMTP 자격 증명을 시작합니다 (AWS 자격 증명 3이 아님). 여전히 제공합니다. 4) 기술적 인 사람들이 수동으로 내 계정의 내용을 수정 한 다음 정품 인증을 받아야합니까? – YumYumYum