Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91708082
PhabricatorMailImplementationAmazonSESAdapter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Nov 13, 17:22
Size
965 B
Mime Type
text/x-php
Expires
Fri, Nov 15, 17:22 (2 d)
Engine
blob
Format
Raw Data
Handle
22311521
Attached To
rPH Phabricator
PhabricatorMailImplementationAmazonSESAdapter.php
View Options
<?php
final
class
PhabricatorMailImplementationAmazonSESAdapter
extends
PhabricatorMailImplementationPHPMailerLiteAdapter
{
private
$message
;
private
$isHTML
;
public
function
__construct
()
{
parent
::
__construct
();
$this
->
mailer
->
Mailer
=
'amazon-ses'
;
$this
->
mailer
->
customMailer
=
$this
;
}
public
function
supportsMessageIDHeader
()
{
// Amazon SES will ignore any Message-ID we provide.
return
false
;
}
/**
* @phutil-external-symbol class SimpleEmailService
*/
public
function
executeSend
(
$body
)
{
$key
=
PhabricatorEnv
::
getEnvConfig
(
'amazon-ses.access-key'
);
$secret
=
PhabricatorEnv
::
getEnvConfig
(
'amazon-ses.secret-key'
);
$root
=
phutil_get_library_root
(
'phabricator'
);
$root
=
dirname
(
$root
);
require_once
$root
.
'/externals/amazon-ses/ses.php'
;
$service
=
new
SimpleEmailService
(
$key
,
$secret
);
$service
->
enableUseExceptions
(
true
);
return
$service
->
sendRawEmail
(
$body
);
}
}
Event Timeline
Log In to Comment