Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92686874
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
Fri, Nov 22, 18:47
Size
946 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 18:47 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22487276
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