Search The ForumSearch   RegisterRegister  LoginLogin

MailBee Objects

 AfterLogic Forum : MailBee Objects
Subject Topic: Office365 Outlook Integration? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
KevinRussell
Newbie
Newbie
Avatar

Joined: 29 November 2016
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 29 November 2016 at 3:43am | IP Logged Quote KevinRussell

Chaps

Is it possible to send emails and parse the inbox of an Office365 Outlook Email account using Mailbee Objects (not .net).

If have searched the forums without success but feel free to point me in the right direction!

Regards
Kevin Russell
Back to Top View KevinRussell's Profile Search for other posts by KevinRussell
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 29 November 2016 at 5:21am | IP Logged Quote Alex

Hi,

You can use it just as any other IMAP or SMTP service. For instance, IMAP (getting folder count, inbox message count, downloading last message):

Code:

Set IMAP = CreateObject("MailBee.IMAP4")
IMAP.LogFilePath = "C:\Temp\imap_log.txt"
IMAP.EnableLogging = True
IMAP.ClearLog
IMAP.LicenseKey = "your key"
IMAP.SSL.Enabled = True
IMAP.SSL.Protocol = 6 ' TLS 1.2
IMAP.Connect "outlook.office365.com", 993, "user@officedomain", "password"
Set Mboxes = IMAP.RetrieveMailboxes(false)
MsgBox MBoxes.Count
IMAP.SelectMailbox "Inbox"
MsgBox IMAP.MessageCount
Set Msg = IMAP.RetrieveSingleMessage(IMAP.MessageCount, False)
MsgBox Msg.Subject
IMAP.Disconnect


SMTP (sending mail to yourself):

Code:

Set SMTP = CreateObject("MailBee.SMTP")
SMTP.EnableLogging = True
SMTP.LogFilePath = "C:\Temp\smtp_log.txt"
SMTP.ClearLog
SMTP.LicenseKey = "your key"
SMTP.ServerName = "smtp.office365.com"
SMTP.SSL.Enabled = True
SMTP.SSL.UseStartTLS = True
SMTP.SSL.Protocol = 6 ' TLS 1.2
SMTP.PortNumber = 587
SMTP.AuthMethod = 2
SMTP.UserName = "user@officedomain"
SMTP.Password = "password"
SMTP.FromAddr = "user@officedomain"
SMTP.ToAddr = "user@officedomain"
SMTP.Message.Subject = "test"
SMTP.Send


Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
KevinRussell
Newbie
Newbie
Avatar

Joined: 29 November 2016
Location: United Kingdom
Online Status: Offline
Posts: 2
Posted: 29 November 2016 at 7:56am | IP Logged Quote KevinRussell

Alex

Worked like a charm - thanks.

Kevin Russell
Back to Top View KevinRussell's Profile Search for other posts by KevinRussell
 

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