IMAP ActiveX email component?
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
IMAP ActiveX email component?
I am interested to know if anyone has used an existing IMAP activeX component to send mail via an IMAP server. If you have, which component you have used and the code you used to access it would be very helpful.
If you have not, but are also interested in this topic, please respond also.
Regards,
James
If you have not, but are also interested in this topic, please respond also.
Regards,
James
Re: IMAP ActiveX email component?
I don't use IMAP for sending emails yet (because lack of time). When I searched for components some weeks ago I found this: SocketTools Library Edition and SocketTools ActiveX Edition of Catalyst Development.
Best Regards,
Ruediger Alich
---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
Ruediger Alich
---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: IMAP ActiveX email component?
Ruediger,
Thanks for the leads. I don't see any mention of IMAP support, so I presume you would have to use the low level tools to build it?
I did find this Chilkat IMAP ActiveX which looks promising.
http://www.softpedia.com/get/Programmin ... iveX.shtml
Regards,
James
Thanks for the leads. I don't see any mention of IMAP support, so I presume you would have to use the low level tools to build it?
I did find this Chilkat IMAP ActiveX which looks promising.
http://www.softpedia.com/get/Programmin ... iveX.shtml
Regards,
James
Re: IMAP ActiveX email component?
At the end this is mentioned:James Bott wrote:Ruediger,
I don't see any mention of IMAP support
The ActiveX Edition provides an interface for all of the major secure Internet protocols such as HTTP, FTPS, SFTP, SMTPS, POP3S, IMAPS and more.
Best Regards,
Ruediger Alich
---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
Ruediger Alich
---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
-
- Posts: 21
- Joined: Mon Aug 09, 2010 8:58 am
Re: IMAP ActiveX email component?
Any guidelines or code you've used successfully ? I'm looking at their SMTP component because I have continuing issues with our current implementation at some client sites.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Re: IMAP ActiveX email component?
I recently purchased the Catalyst Socket Tools Library addition and incorporated the smtp emailing functions into our app however, I'm using the dll's, not the activeX components. So far it's working very well.
If you decide to go this route here are my DLL definitions for the functions I'm using, maybe it will save you a little time.
Randal
DLL FUNCTION SmtpInitialize(license AS LPSTR, initdata AS LPSTR) AS BOOL ;
PASCAL FROM "SmtpInitializeA" LIB hSmtp
DLL FUNCTION SmtpUninitialize() AS VOID ;
PASCAL FROM "SmtpUninitialize" LIB hSmtp
DLL FUNCTION SmtpAuthenticate(hClient AS LONG, authtype AS LONG, username AS LPSTR, password AS LPSTR) AS _INT ;
PASCAL FROM "SmtpAuthenticateA" LIB hSmtp
DLL FUNCTION SmtpGetLastError() AS DWORD ;
PASCAL FROM "SmtpGetLastError" LIB hSmtp
DLL FUNCTION SmtpGetErrorString( errorcode AS DWORD, @description AS LPSTR, maxlength AS _INT) AS _INT ;
PASCAL FROM "SmtpGetErrorStringA" LIB hSmtp
DLL FUNCTION SmtpGetResultCode( hClient AS LONG) AS _INT ;
PASCAL FROM "SmtpGetResultCode" LIB hSmtp
DLL FUNCTION SmtpGetResultString( hClient AS LONG, @cResult AS LPSTR, nLen AS _INT) AS _INT ;
PASCAL FROM "SmtpGetResultStringA" LIB hSmtp
DLL FUNCTION SmtpGetCurrentDate( date AS LPSTR, len AS LONG) AS _INT ;
PASCAL FROM "SmtpGetCurrentDateA" LIB hSmtp
DLL FUNCTION SmtpGetStatus( hClient AS LONG) AS _INT ;
PASCAL FROM "SmtpGetStatus" LIB hSmtp
DLL FUNCTION SmtpIsConnected( hClient AS LONG) AS BOOL ;
PASCAL FROM "SmtpIsConnected" LIB hSmtp
DLL FUNCTION SmtpConnect( remotehost AS LPSTR, port AS _INT, timeout AS _INT, options AS DWORD, localname AS LPSTR, @cred AS LPSTR) AS LONG ;
PASCAL FROM "SmtpConnectA" LIB hSmtp
DLL FUNCTION SmtpDisconnect( hClient AS LONG ) AS _INT ;
PASCAL FROM "SmtpDisconnect" LIB hSmtp
DLL FUNCTION SmtpSendMessage( hClient AS LONG, from AS LPSTR, to AS LPSTR, message AS LPSTR, messagesize AS DWORD, options AS DWORD) AS _INT ;
PASCAL FROM "SmtpSendMessageA" LIB hSmtp
*DLL FUNCTION SmtpAddRecipient( hClient AS LONG, to AS LPSTR) AS _INT ;
* PASCAL FROM "SmtpAddRecipientA" LIB hSmtp
//----------------------------------------------------------------------------//
// Mime library
DLL FUNCTION MimeInitialize(license AS LPSTR, initdata AS LPSTR) AS BOOL ;
PASCAL FROM "MimeInitializeA" LIB hMime
DLL FUNCTION MimeUninitialize() AS VOID ;
PASCAL FROM "MimeUninitialize" LIB hMime
DLL FUNCTION MimeGetMessageVersion(hMessage AS LONG) AS STRING ;
PASCAL FROM "MimeGetMessageVersionA" LIB hMime
DLL FUNCTION MimeComposeMessage( from AS LPSTR, to AS LPSTR, cc AS LPSTR, subject AS LPSTR, messagetext AS LPSTR, messagehtml AS LPSTR, characterset AS _INT, encodingtype AS _INT) AS LONG ;
PASCAL FROM "MimeComposeMessageA" LIB hMime
DLL FUNCTION MimeDeleteMessage( hMessage AS LONG) AS BOOL ;
PASCAL FROM "MimeDeleteMessage" LIB hMime
DLL FUNCTION MimeExportMessageEx( hMessage AS LONG, exportmode AS DWORD, exportoptions AS DWORD, @message AS LPSTR, @messagesize AS DWORD) AS _INT ;
PASCAL FROM "MimeExportMessageExA" LIB hMime
DLL FUNCTION MimeAttachFile( hMessage AS LONG, filename AS LPSTR, options AS DWORD) AS _INT ;
PASCAL FROM "MimeAttachFileA" LIB hMime
DLL FUNCTION MimeGetLastError() AS _INT ;
PASCAL FROM "MimeGetLastError" LIB hMime
DLL FUNCTION MimeGetMessageHeaderEx( hMessage AS LONG, messagepart AS _INT, header AS LPSTR, @value AS LPSTR, maxvalue AS _INT) AS _INT ;
PASCAL FROM "MimeGetMessageHeaderExA" LIB hMime
DLL FUNCTION MimeGetMessagePartCount( hMessage AS LONG) AS _INT ;
PASCAL FROM "MimeGetMessagePartCount" LIB hMime
DLL FUNCTION MimeCreateMessage() AS LONG ;
PASCAL FROM "MimeCreateMessage" LIB hMime
DLL FUNCTION MimeImportMessageEx( hMessage AS LONG, importmode AS DWORD, importoptions AS DWORD, @message AS LPSTR, @messagesize AS DWORD) AS _INT ;
PASCAL FROM "MimeImportMessageExA" LIB hMime
DLL FUNCTION MimeExtractFile( hMessage AS LONG, @filename AS LPSTR) AS _INT ;
PASCAL FROM "MimeExtractFileA" LIB hMime
DLL FUNCTION MimeGetAttachedFileName( hMessage AS LONG, @filename AS LPSTR) AS _INT ;
PASCAL FROM "MimeGetAttachedFileNameA" LIB hMime
DLL FUNCTION MimeSetMessagePart( hMessage AS LONG, part AS _INT) AS _INT ;
PASCAL FROM "MimeSetMessagePart" LIB hMime
DLL FUNCTION MimeGetMessageText( hMessage AS LONG, offset AS LONG, @buffer AS LPSTR, bufferlen AS LONG) AS _INT ;
PASCAL FROM "MimeGetMessageTextA" LIB hMime
If you decide to go this route here are my DLL definitions for the functions I'm using, maybe it will save you a little time.
Randal
DLL FUNCTION SmtpInitialize(license AS LPSTR, initdata AS LPSTR) AS BOOL ;
PASCAL FROM "SmtpInitializeA" LIB hSmtp
DLL FUNCTION SmtpUninitialize() AS VOID ;
PASCAL FROM "SmtpUninitialize" LIB hSmtp
DLL FUNCTION SmtpAuthenticate(hClient AS LONG, authtype AS LONG, username AS LPSTR, password AS LPSTR) AS _INT ;
PASCAL FROM "SmtpAuthenticateA" LIB hSmtp
DLL FUNCTION SmtpGetLastError() AS DWORD ;
PASCAL FROM "SmtpGetLastError" LIB hSmtp
DLL FUNCTION SmtpGetErrorString( errorcode AS DWORD, @description AS LPSTR, maxlength AS _INT) AS _INT ;
PASCAL FROM "SmtpGetErrorStringA" LIB hSmtp
DLL FUNCTION SmtpGetResultCode( hClient AS LONG) AS _INT ;
PASCAL FROM "SmtpGetResultCode" LIB hSmtp
DLL FUNCTION SmtpGetResultString( hClient AS LONG, @cResult AS LPSTR, nLen AS _INT) AS _INT ;
PASCAL FROM "SmtpGetResultStringA" LIB hSmtp
DLL FUNCTION SmtpGetCurrentDate( date AS LPSTR, len AS LONG) AS _INT ;
PASCAL FROM "SmtpGetCurrentDateA" LIB hSmtp
DLL FUNCTION SmtpGetStatus( hClient AS LONG) AS _INT ;
PASCAL FROM "SmtpGetStatus" LIB hSmtp
DLL FUNCTION SmtpIsConnected( hClient AS LONG) AS BOOL ;
PASCAL FROM "SmtpIsConnected" LIB hSmtp
DLL FUNCTION SmtpConnect( remotehost AS LPSTR, port AS _INT, timeout AS _INT, options AS DWORD, localname AS LPSTR, @cred AS LPSTR) AS LONG ;
PASCAL FROM "SmtpConnectA" LIB hSmtp
DLL FUNCTION SmtpDisconnect( hClient AS LONG ) AS _INT ;
PASCAL FROM "SmtpDisconnect" LIB hSmtp
DLL FUNCTION SmtpSendMessage( hClient AS LONG, from AS LPSTR, to AS LPSTR, message AS LPSTR, messagesize AS DWORD, options AS DWORD) AS _INT ;
PASCAL FROM "SmtpSendMessageA" LIB hSmtp
*DLL FUNCTION SmtpAddRecipient( hClient AS LONG, to AS LPSTR) AS _INT ;
* PASCAL FROM "SmtpAddRecipientA" LIB hSmtp
//----------------------------------------------------------------------------//
// Mime library
DLL FUNCTION MimeInitialize(license AS LPSTR, initdata AS LPSTR) AS BOOL ;
PASCAL FROM "MimeInitializeA" LIB hMime
DLL FUNCTION MimeUninitialize() AS VOID ;
PASCAL FROM "MimeUninitialize" LIB hMime
DLL FUNCTION MimeGetMessageVersion(hMessage AS LONG) AS STRING ;
PASCAL FROM "MimeGetMessageVersionA" LIB hMime
DLL FUNCTION MimeComposeMessage( from AS LPSTR, to AS LPSTR, cc AS LPSTR, subject AS LPSTR, messagetext AS LPSTR, messagehtml AS LPSTR, characterset AS _INT, encodingtype AS _INT) AS LONG ;
PASCAL FROM "MimeComposeMessageA" LIB hMime
DLL FUNCTION MimeDeleteMessage( hMessage AS LONG) AS BOOL ;
PASCAL FROM "MimeDeleteMessage" LIB hMime
DLL FUNCTION MimeExportMessageEx( hMessage AS LONG, exportmode AS DWORD, exportoptions AS DWORD, @message AS LPSTR, @messagesize AS DWORD) AS _INT ;
PASCAL FROM "MimeExportMessageExA" LIB hMime
DLL FUNCTION MimeAttachFile( hMessage AS LONG, filename AS LPSTR, options AS DWORD) AS _INT ;
PASCAL FROM "MimeAttachFileA" LIB hMime
DLL FUNCTION MimeGetLastError() AS _INT ;
PASCAL FROM "MimeGetLastError" LIB hMime
DLL FUNCTION MimeGetMessageHeaderEx( hMessage AS LONG, messagepart AS _INT, header AS LPSTR, @value AS LPSTR, maxvalue AS _INT) AS _INT ;
PASCAL FROM "MimeGetMessageHeaderExA" LIB hMime
DLL FUNCTION MimeGetMessagePartCount( hMessage AS LONG) AS _INT ;
PASCAL FROM "MimeGetMessagePartCount" LIB hMime
DLL FUNCTION MimeCreateMessage() AS LONG ;
PASCAL FROM "MimeCreateMessage" LIB hMime
DLL FUNCTION MimeImportMessageEx( hMessage AS LONG, importmode AS DWORD, importoptions AS DWORD, @message AS LPSTR, @messagesize AS DWORD) AS _INT ;
PASCAL FROM "MimeImportMessageExA" LIB hMime
DLL FUNCTION MimeExtractFile( hMessage AS LONG, @filename AS LPSTR) AS _INT ;
PASCAL FROM "MimeExtractFileA" LIB hMime
DLL FUNCTION MimeGetAttachedFileName( hMessage AS LONG, @filename AS LPSTR) AS _INT ;
PASCAL FROM "MimeGetAttachedFileNameA" LIB hMime
DLL FUNCTION MimeSetMessagePart( hMessage AS LONG, part AS _INT) AS _INT ;
PASCAL FROM "MimeSetMessagePart" LIB hMime
DLL FUNCTION MimeGetMessageText( hMessage AS LONG, offset AS LONG, @buffer AS LPSTR, bufferlen AS LONG) AS _INT ;
PASCAL FROM "MimeGetMessageTextA" LIB hMime
Re: IMAP ActiveX email component?
Actually I was asking about MailBee ... re: code
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
-
- Posts: 21
- Joined: Mon Aug 09, 2010 8:58 am
Re: IMAP ActiveX email component?
FUNCTION EMI_100SMTPSEND()
SMTP = CreateObject("EasyMail.SMTP")
SMTP.MailServer = strServer
SMTP.FromAddr = strFrom
SMTP.AddRecipient("", strTo, 1)
SMTP.Subject = strSubject
SMTP.BodyText = strBodyText
x = SMTP.Send()
If x = 0 Then
MessageBox("Message sent successfully.")
Else
MessageBox("There was an error sending your message. Error: " + AllTrim(Str(x)))
EndIf
Release SMTP
SMTP = CreateObject("EasyMail.SMTP")
SMTP.MailServer = strServer
SMTP.FromAddr = strFrom
SMTP.AddRecipient("", strTo, 1)
SMTP.Subject = strSubject
SMTP.BodyText = strBodyText
x = SMTP.Send()
If x = 0 Then
MessageBox("Message sent successfully.")
Else
MessageBox("There was an error sending your message. Error: " + AllTrim(Str(x)))
EndIf
Release SMTP
-
- Posts: 21
- Joined: Mon Aug 09, 2010 8:58 am
Re: IMAP ActiveX email component?
FUNCTION EMI_100_MB_GETIMAP( STRSERVER, STRACCOUNT, STRPASSWORD , cReal )
LOCAL NRET
LOCAL OIMAP
LOCAL AENVELOPE
LOCAL AMESSAGES
LOCAL NCOUNT := 0
LOCAL N := 1
LOCAL oEnvelopes
LOCAL cFolder := "INBOX"
LOCAL i := 1
LOCAL cLogfile := GetlogFileName("Imap")
OIMAP := TOLEAUTO():NEW( "MAILBEE.IMAP4" )
OIMAP:LICENSEKEY := CMB_MAILKEY
OIMAP:SERVERNAME := AllTrim( STRSERVER )
OIMAP:USERNAME := AllTrim( STRACCOUNT )
OIMAP:PASSWORD := AllTrim( STRPASSWORD )
IF LOGIMAP = .T.
OIMAP:ENABLELOGGING := .T.
ELSE
OIMAP:ENABLELOGGING := .F.
ENDIF
* OIMAP:LOGFILEPATH := cLogfile
*OIMAP:CLEARLOG()
IF OIMAP:CONNECT() = .F.
ENDIF
IF OIMAP:selectMailBox( cFolder ) = .f.
ENDIF
oEnvelopes := OIMAP:RetrieveEnvelopes( 1, 10000, .f. )
NCOUNT := OIMAP:messageCount()
DO CASE
CASE NCOUNT = 0
CASE NCOUNT = 1
CASE NCOUNT > 1
ENDCASE
INB_100:SETORDER( 1 )
FOR N = 1 TO NCOUNT
CSEEK := ALLTRIM( UPPER( STRACCOUNT ) ) + "-" + ALLTRIM( STR( OENVELOPES [ N ]:UID ) )
IF INB_100:SEEK( cSeek ) = .f.
INB_100:BLANK()
INB_100:SUBJECT := oEnvelopes [ N ]:SUBJECT
INB_100:IMAPID := AllTrim( Upper( STRACCOUNT ) ) + "-" + AllTrim( Str( oEnvelopes [ N ]:UID ) )
objMsg := OIMAP:RetrieveSingleMessage( oEnvelopes [ N ]:UID , .T. )
INB_100:REAL_NAME := clean( cReal )
INB_100:MESSAGE := objMsg:bodyText
* EBM_100:FROM := oEnvelopes [n] :FROM
INB_100:FROMADRR := oEnvelopes [ N ] :FROMADDR
INB_100:FLAGS := oEnvelopes [ N ] :FLAGS
INB_100:SIZE := oEnvelopes [ N ] :SIZE
INB_100:Date := oEnvelopes [ N ] :Date
INB_100:RFC822DATE := oEnvelopes [ N ] :RFC822DATE
INB_100:EDIT_ID := MYL_100_EDIT_ID()
INB_100:APPEND()
INB_100:SAVE()
i ++
NEXT
OIMAP:DISCONNECT()
OIMAP:Disconnect()
RETURN .t.
LOCAL NRET
LOCAL OIMAP
LOCAL AENVELOPE
LOCAL AMESSAGES
LOCAL NCOUNT := 0
LOCAL N := 1
LOCAL oEnvelopes
LOCAL cFolder := "INBOX"
LOCAL i := 1
LOCAL cLogfile := GetlogFileName("Imap")
OIMAP := TOLEAUTO():NEW( "MAILBEE.IMAP4" )
OIMAP:LICENSEKEY := CMB_MAILKEY
OIMAP:SERVERNAME := AllTrim( STRSERVER )
OIMAP:USERNAME := AllTrim( STRACCOUNT )
OIMAP:PASSWORD := AllTrim( STRPASSWORD )
IF LOGIMAP = .T.
OIMAP:ENABLELOGGING := .T.
ELSE
OIMAP:ENABLELOGGING := .F.
ENDIF
* OIMAP:LOGFILEPATH := cLogfile
*OIMAP:CLEARLOG()
IF OIMAP:CONNECT() = .F.
ENDIF
IF OIMAP:selectMailBox( cFolder ) = .f.
ENDIF
oEnvelopes := OIMAP:RetrieveEnvelopes( 1, 10000, .f. )
NCOUNT := OIMAP:messageCount()
DO CASE
CASE NCOUNT = 0
CASE NCOUNT = 1
CASE NCOUNT > 1
ENDCASE
INB_100:SETORDER( 1 )
FOR N = 1 TO NCOUNT
CSEEK := ALLTRIM( UPPER( STRACCOUNT ) ) + "-" + ALLTRIM( STR( OENVELOPES [ N ]:UID ) )
IF INB_100:SEEK( cSeek ) = .f.
INB_100:BLANK()
INB_100:SUBJECT := oEnvelopes [ N ]:SUBJECT
INB_100:IMAPID := AllTrim( Upper( STRACCOUNT ) ) + "-" + AllTrim( Str( oEnvelopes [ N ]:UID ) )
objMsg := OIMAP:RetrieveSingleMessage( oEnvelopes [ N ]:UID , .T. )
INB_100:REAL_NAME := clean( cReal )
INB_100:MESSAGE := objMsg:bodyText
* EBM_100:FROM := oEnvelopes [n] :FROM
INB_100:FROMADRR := oEnvelopes [ N ] :FROMADDR
INB_100:FLAGS := oEnvelopes [ N ] :FLAGS
INB_100:SIZE := oEnvelopes [ N ] :SIZE
INB_100:Date := oEnvelopes [ N ] :Date
INB_100:RFC822DATE := oEnvelopes [ N ] :RFC822DATE
INB_100:EDIT_ID := MYL_100_EDIT_ID()
INB_100:APPEND()
INB_100:SAVE()
i ++
NEXT
OIMAP:DISCONNECT()
OIMAP:Disconnect()
RETURN .t.
Re: IMAP ActiveX email component?
BUENAS NOCHES ALQUIEN QUE ME pueda ayudar
con la FUNCION HB_STRTO UTF8 DE XHARBUR 0.82
GRACIAS
con la FUNCION HB_STRTO UTF8 DE XHARBUR 0.82
GRACIAS