Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Send Email Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bravedave
Newbie
Newbie


Joined: 05 September 2014
Location: Australia
Online Status: Offline
Posts: 35
Posted: 12 April 2015 at 9:45pm | IP Logged Quote bravedave

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 View bravedave's Profile Search for other posts by bravedave
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 13 April 2015 at 5:55am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 
bravedave
Newbie
Newbie


Joined: 05 September 2014
Location: Australia
Online Status: Offline
Posts: 35
Posted: 14 April 2015 at 4:50am | IP Logged Quote bravedave

Thanks Igor - just what I was after
Back to Top View bravedave's Profile Search for other posts by bravedave
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide