Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101485448
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
Mon, Feb 10, 22:15
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Feb 12, 22:15 (2 d)
Engine
blob
Format
Raw Data
Handle
24161952
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
$this
->
guessIfHostSupportsMessageID
(
$this
->
getOption
(
'message-id'
),
null
);
}
protected
function
validateOptions
(
array
$options
)
{
PhutilTypeSpec
::
checkMap
(
$options
,
array
(
'message-id'
=>
'bool|null'
,
));
}
public
function
newDefaultOptions
()
{
return
array
(
'message-id'
=>
null
,
);
}
/**
* @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