Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
|
IMAP NOOP CommandDemonstrates how to send an IMAP NOOP command using SendRawCommand.
CREATE PROCEDURE ChilkatSample AS BEGIN DECLARE @hr int DECLARE @sTmp0 nvarchar(4000) DECLARE @imap int EXEC @hr = sp_OACreate 'Chilkat.Imap', @imap OUT IF @hr <> 0 BEGIN PRINT 'Failed to create ActiveX component' RETURN END DECLARE @success int -- Anything unlocks the component and begins a fully-functional 30-day trial. EXEC sp_OAMethod @imap, 'UnlockComponent', @success OUT, 'Anything for 30-day trial' IF @success <> 1 BEGIN EXEC sp_OAGetProperty @imap, 'LastErrorText', @sTmp0 OUT PRINT @sTmp0 RETURN END -- Connect to an IMAP server. EXEC sp_OAMethod @imap, 'Connect', @success OUT, 'mail.chilkatsoft.com' IF @success <> 1 BEGIN EXEC sp_OAGetProperty @imap, 'LastErrorText', @sTmp0 OUT PRINT @sTmp0 RETURN END -- Login EXEC sp_OAMethod @imap, 'Login', @success OUT, '****', '****' IF @success <> 1 BEGIN EXEC sp_OAGetProperty @imap, 'LastErrorText', @sTmp0 OUT PRINT @sTmp0 RETURN END -- Send a NOOP command DECLARE @response nvarchar(4000) EXEC sp_OAMethod @imap, 'SendRawCommand', @response OUT, 'NOOP' PRINT @response -- Disconnect from the IMAP server. EXEC sp_OAMethod @imap, 'Disconnect', NULL END GO |
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.