Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60576117
PhabricatorMailSendmailAdapter.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, May 1, 05:15
Size
946 B
Mime Type
text/x-php
Expires
Fri, May 3, 05:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17377787
Attached To
rPH Phabricator
PhabricatorMailSendmailAdapter.php
View Options
<?php
final
class
PhabricatorMailSendmailAdapter
extends
PhabricatorMailAdapter
{
const
ADAPTERTYPE
=
'sendmail'
;
public
function
getSupportedMessageTypes
()
{
return
array
(
PhabricatorMailEmailMessage
::
MESSAGETYPE
,
);
}
public
function
supportsMessageIDHeader
()
{
return
true
;
}
protected
function
validateOptions
(
array
$options
)
{
PhutilTypeSpec
::
checkMap
(
$options
,
array
(
'encoding'
=>
'string'
,
));
}
public
function
newDefaultOptions
()
{
return
array
(
'encoding'
=>
'base64'
,
);
}
/**
* @phutil-external-symbol class PHPMailerLite
*/
public
function
sendMessage
(
PhabricatorMailExternalMessage
$message
)
{
$root
=
phutil_get_library_root
(
'phabricator'
);
$root
=
dirname
(
$root
);
require_once
$root
.
'/externals/phpmailer/class.phpmailer-lite.php'
;
$mailer
=
PHPMailerLite
::
newFromMessage
(
$message
);
$mailer
->
Send
();
}
}
Event Timeline
Log In to Comment