Author |
|
bravedave Newbie
Joined: 05 September 2014 Location: Australia
Online Status: Offline Posts: 35
|
Posted: 12 April 2015 at 9:45pm | IP Logged
|
|
|
I want to use this part of the API
http://www.afterlogic.com/wiki/API_reference:_Mail_(WebMail)#MessageSend
Is there any documentation on:
* \MailSo\Mime\Message $oMessage
* \CFetcher $oFetcher
or even an example of how to send a message (from PHP of course)
Thanks in advance
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 13 April 2015 at 5:55am | IP Logged
|
|
|
MailSo and Fetcher aren't currently documented, we do have an example of sending message though:
Code:
$oMessage = \MailSo\Mime\Message::NewInstance(); $oMessage->RegenerateMessageId();
$oMessage
->SetFrom($oFrom)
->SetSubject($sSubject)
;
$oToEmails = \MailSo\Mime\EmailCollection::NewInstance("To");
if ($oToEmails && $oToEmails->Count())
{
$oMessage->SetTo($oToEmails);
}
$oMessage->AddText($sText, false);
$oMessage->AddText($sHtml, true);
// $rResource - file atachment resource
if (is_resource($rResource))
{
$oMessage->Attachments()->Add(
\MailSo\Mime\Attachment::NewInstance($rResource, $sFileName, ...)
);
}
$oApiMailManager = CApi::Manager('mail');
$oApiMailManager->MessageSend($oAccount, $oMessage); |
|
|
Hope this helps!
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
bravedave Newbie
Joined: 05 September 2014 Location: Australia
Online Status: Offline Posts: 35
|
Posted: 14 April 2015 at 4:50am | IP Logged
|
|
|
Thanks Igor - just what I was after
|
Back to Top |
|
|