I have been using saveeml to save inbound emails related to transactions in an application. Recently a change in business process has resulted in a need to save any attached files as well. The saveeml doesn't do this. I could manually strip out the achment(s) and deal with them separately but it sure would be easier to be able to save the entire message including attachments with one method call. Any ideas?
Saveeml and attachmens
Error connecting to IMAP Server
We've been using Chilkat to connect to our Exchange 2010 Server for a while and all has been fine, until a few weeks ago when users could no longer connect.
The certificate on the mail domain was about to expire (but was still valid) and I thought it may be somehow to do with that, but now it has been renewed we are getting new errors and I'm not sure what I can do to resolve as nothing has changed that I'm aware of other than the renewed certificate, any suggestions?
ChilkatLog:
Connect_Imap(1469ms):
DllDate: Nov 13 2016
ChilkatVersion: 9.5.0.64
UnlockPrefix: myunlockprefix
Architecture: Little Endian; 32-bit
Language: Visual C++ 8.0 (32-bit)
VerboseLogging: 1
connectInner(1422ms):
connectToImapServer(1407ms):
hostname: mail.mycompany.net
port: 993
socket2Connect(1391ms):
connect2(1375ms):
hostname: mail.canburg.net
port: 993
ssl: 1
connectImplicitSsl(1359ms):
Clearing TLS client certificates.
connectSocket(1187ms):
domainOrIpAddress: mail.mycompany.net
port: 993
connectTimeoutMs: 30000
connect_ipv6_or_ipv4(1172ms):
Multi-threaded domain to IP address resolution
connecting to IPV4 address...
ipAddress: external.ip.address
createSocket(15ms):
Setting SO_SNDBUF size
sendBufSize: 262144
Setting SO_RCVBUF size
recvBufSize: 4194304
--createSocket
connect(47ms):
Waiting for the connect to complete...
myIP: 192.168.1.53
myPort: 63797
socket connect successful.
--connect
--connect_ipv6_or_ipv4
--connectSocket
clientHandshake(140ms):
The client cert chain is NULL.
cacheClientCerts(15ms):
Cached TLS client certificates.
Client cert chain is NULL.
--cacheClientCerts
clientHandshake2(125ms):
readHandshakeMessages(47ms):
WindowsError: An established connection was aborted by the software in your host machine.
WindowsErrorCode: 0x2745
numBytesRequested: 5
Failed to receive data on the TCP socket
sockRecv: Socket fatal error.
Failed to read beginning of SSL/TLS record.
b: 0
dbSize: 0
nReadNBytes: 0
--readHandshakeMessages
--clientHandshake2
--clientHandshake
Client handshake failed. (3)
--connectImplicitSsl
ConnectFailReason: 103
--connect2
--socket2Connect
failReason: 0
--connectToImapServer
connect failed.
--connectInner
Failed.
--Connect_Imap
--ChilkatLog
EDIT: Not sure if this would help figure out the issue, but at the same time we started having problems sending emails using SMTP using the same server, output below:
ChilkatLog:
SendEmail(7297ms):
DllDate: Nov 13 2016
ChilkatVersion: 9.5.0.64
UnlockPrefix: MyUnlockPrefix
Architecture: Little Endian; 32-bit
Language: Visual C++ 8.0 (32-bit)
VerboseLogging: 1
sendEmailInner(7187ms):
getSmtpReversePath(15ms):
fromCkxBounceAddr: fromaddress@mydomain.com
--getSmtpReversePath
renderToMime(1359ms):
createEmailForSending(859ms):
xSigningAlg: sha1
Auto-generating Message-ID
clone2(828ms):
assembleMimeBody(344ms):
contentType: multipart/mixed
isEmailAttachment(62ms):
attachmentReason(46ms):
contentType: multipart/mixed
subject: [U=1074][T=DJ][J=60000][V=1][C=Dr Dempsey][F=1074][S=IM][R=Bathroom][Co=SMB]
from: "Adam Dempsey" <fromaddress@mydomain.com>
No (multipart enclosure)
--attachmentReason
--isEmailAttachment
assembleMimeBody(63ms):
contentType: text/plain
isEmailAttachment(31ms):
attachmentReason(31ms):
contentType: text/plain
No, attachment is not indicated.
--attachmentReason
--isEmailAttachment
getEncodedBody(16ms):
contentType: text/plain
cp: 0
--getEncodedBody
--assembleMimeBody
assembleMimeBody(94ms):
contentType: application/zip
isEmailAttachment(62ms):
attachmentReason(31ms):
contentType: application/zip
disposition: attachment
filename: DJ.tab.zip
name: DJ.tab.zip
Yes (disposition=attachment)
--attachmentReason
--isEmailAttachment
getEncodedBody(16ms):
contentType: application/zip
--getEncodedBody
--assembleMimeBody
--assembleMimeBody
--clone2
--createEmailForSending
assembleMimeBody(484ms):
contentType: multipart/mixed
isEmailAttachment(62ms):
attachmentReason(62ms):
contentType: multipart/mixed
subject: [U=1074][T=DJ][J=60000][V=1][C=Dr Dempsey][F=1074][S=IM][R=Bathroom][Co=SMB]
from: "Adam Dempsey" <fromaddress@mydomain.com>
No (multipart enclosure)
--attachmentReason
--isEmailAttachment
assembleMimeBody(125ms):
contentType: text/plain
isEmailAttachment(79ms):
attachmentReason(47ms):
contentType: text/plain
No, attachment is not indicated.
--attachmentReason
--isEmailAttachment
getEncodedBody(15ms):
contentType: text/plain
cp: 0
--getEncodedBody
--assembleMimeBody
assembleMimeBody(109ms):
contentType: application/zip
isEmailAttachment(63ms):
attachmentReason(47ms):
contentType: application/zip
disposition: attachment
filename: DJ.tab.zip
name: DJ.tab.zip
Yes (disposition=attachment)
--attachmentReason
--isEmailAttachment
getEncodedBody(15ms):
contentType: application/zip
--getEncodedBody
--assembleMimeBody
Email assembled.
--assembleMimeBody
renderToMime: Elapsed time: 1343 millisec
--renderToMime
sendMimeInner(5734ms):
ensureSmtpSession(5719ms):
ensureSmtpConnection(5703ms):
SmtpHost: mail.mydomain.net
SmtpPort: 587
SmtpUsername: providence
SmtpSsl: 0
StartTLS: 1
smtpConnect(5656ms):
smtpHostname: mail.mydomain.net
smtpPort: 587
connectionIsReady(15ms):
Need new SMTP connection
--connectionIsReady
smtpSocketConnect(359ms):
socket2Connect(312ms):
connect2(297ms):
hostname: mail.mydomain.net
port: 587
ssl: 0
connectSocket(266ms):
domainOrIpAddress: mail.mydomain.net
port: 587
connectTimeoutMs: 30000
connect_ipv6_or_ipv4(235ms):
Multi-threaded domain to IP address resolution
connecting to IPV4 address...
ipAddress: 192.168.100.33
createSocket(32ms):
Setting SO_SNDBUF size
sendBufSize: 262144
Setting SO_RCVBUF size
recvBufSize: 4194304
--createSocket
connect(62ms):
Waiting for the connect to complete...
myIP: 192.168.168.28
myPort: 49703
socket connect successful.
--connect
--connect_ipv6_or_ipv4
--connectSocket
--connect2
--socket2Connect
Turning on TCP_NODELAY.
socketOptions(32ms):
SO_SNDBUF: 262144
SO_RCVBUF: 4194304
TCP_NODELAY: 1
SO_KEEPALIVE: 1
--socketOptions
--smtpSocketConnect
smtpGreeting(16ms):
readSmtpResponse(16ms):
SmtpCmdResp: 220 ServerName.Domain.LOCAL Microsoft ESMTP MAIL Service ready at Mon, 19 Dec 2016 08:31:56 +0000
--readSmtpResponse
--smtpGreeting
startTLS(5204ms):
Will be using STARTTLS...
sendCmdToSmtp(16ms):
SmtpCmdSent: EHLO CBM4006800D4J<CRLF>
--sendCmdToSmtp
readSmtpResponse(78ms):
SmtpCmdResp: 250-ServerName.Domain.LOCAL Hello [192.168.168.28]
SmtpCmdResp: 250-SIZE 41943040
SmtpCmdResp: 250-PIPELINING
SmtpCmdResp: 250-DSN
SmtpCmdResp: 250-ENHANCEDSTATUSCODES
SmtpCmdResp: 250-AUTH GSSAPI NTLM
SmtpCmdResp: 250-8BITMIME
SmtpCmdResp: 250-BINARYMIME
SmtpCmdResp: 250 CHUNKING
--readSmtpResponse
sendCmdToSmtp(15ms):
SmtpCmdSent: STARTTLS<CRLF>
--sendCmdToSmtp
readSmtpResponse(5032ms):
SmtpCmdResp: 500 5.3.3 Unrecognized command
--readSmtpResponse
Non-success STARTTLS response.
--startTLS
--smtpConnect
--ensureSmtpConnection
--ensureSmtpSession
--sendMimeInner
--sendEmailInner
Failed.
--SendEmail
--ChilkatLog
download with utf8 encodig
I am using standard http.Download(url, file) to download a text file. On the pc the result is ok, but on the Mac the result is garbled (ANSI?). I tried http.get_Utf8() and http.put_Utf8(true), but no luck.
What must I do to get readable text back on PC and on Mac?
-Pim
Image in Email Handled as Attachment and not Related Data?
I have an email message that contains an embedded image.
The image in the email has a Content-ID and this content ID is referred in the body's html so this should come under the "related data" category, Chilkat handles it as an "attachment".
Why is this the case?
No ZIP file written on some machines on Windows 10
I use Chilkat ZIP on VC++ for a software application that's run for years.
Suddenly, some users are reporting that the ZIP file isn't being written at all on their computers. On other computers (like mine), it's fine. I'm guessing (!) it has to do with a Microsoft Windows 10 update or a Microsoft support library changing or being missing.
- Are there any similar reports?
- Any ideas on what the problem is?
- How do I debug it on someone else's computer? Report some error code?
- I have a 2010 version. It looks like the latest is 2013. Would it pay to upgrade?
- If so, how do I do that and how much would it cost?
Ftp2 Obj-C (Mac OS) on TLS/SSL the property "BandwidthThrottleDown" does not work!
The module treaty is "Ftp2" Obj-C (Mac OS).
If TLS (AuthTLS=true) mode has been activated, the "BandwidthThrottleDown" property does not work (no limit)!
Otherwise if I connect in "clear mode" (nothing Encryption) it works.
I also tried to clean (no TLS) the "Control Channel", after connection, and with DataProtection to "private"; but the "Channel Data" is not encrypted!
Help me, Please!
FIPS compliant AES algorithm with .Net Zip?
Is the AES implementation used in the .Net Zip component the FIPS compliant AesCryptoServiceProvider class or does it use the RijndaelManaged class? Is there a way to set which AES implementation it uses from the .Net framework?
I want to receive a notification (event) when data arrives on my socket?
I am using ActiveX Socket with FoxPro and do not trigger events when receiving data in the buffer on an active connection.
Java class file has wrong version 52.0, should be 50.0
I got this error when trying to test the Chilkat Java API straight out of the box..
Test.java:6: cannot access com.chilkatsoft.CkCrypt2 bad class file: comchilkatsoftCkCrypt2.class(comchilkatsoft:CkCrypt2.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath. import com.chilkatsoft.CkCrypt2; ^ Error: Could not find or load main class Test
Passing byte[] in Chilkat Java API
I have a working hashing task in VB.NET as follows:
Dim operand As Byte() = some bytes.... Dim ckCrypt As New Chilkat.Crypt2() ckCrypt.EncodingMode = "Base64" ckCrypt.HashAlgorithm = "sha1" Dim lNewDigest As String = ckCrypt.HashBytesENC(operand)
This works perfectly. The variable lNewDigest gets the Digest value as expected.
Now I have a need to have the same task in Android.
So my code is:
byte[] operand= some bytes.... CkCrypt2 ckCrypt = new CkCrypt2(); ckCrypt.put_EncodingMode( "Base64"); ckCrypt.put_HashAlgorithm ( "sha1"); String lNewDigest = ckCrypt.HashBytesENC(operand);
I saw some example on using CkByteData in between. But I am totally lost. I did not have any luck in appending plain bytes (operand) to CkByteData.
HTTP "sockRecv: Socket operation timeout." on clientHandshake2
We have software that tries to make a connection to a third party. The software was utilizing the Microsoft MSXML HTTP object to make HTTP POSTs. Recently the third party disabled the SSLv3 protocol and will be disabling TLS 1.0 in the near future. After the SSLv3 protocol disabling, one of our clients has 2 Windows 7 PCs that fail to make the connection to the third party server, but 1 Windows 7 PC that is successful. Numerous other clients with different OSes have no issue.
Figuring it might have been an issue in the MSXML HTTP object, I wrote a test application using the Chilkat ActiveX library we have access to. This test application connects without issue to the third party on my Windows 10 PC, on a separate client's Windows 7 PC (that is not having this issue), and on the 1 Windows PC that can still connect at the client having this connection issue. However, the other 2 PCs get an error during the clientHandshake2 process according to the log. We have numerous other clients who have no issues with this connection, it is just this one client with 2 PCs that don't work and 1 PC that does with all 3 PCs going through the same network.
1) Does Chilkat use OS level components to make the HTTP connection. For example, Windows XP cannot make TLS 1.1 or TLS 1.2 connections because it is limited to TLS 1.0 in the OS and all Windows components are affected. Could Chilkat make a TLS 1.1 or TLS 1.2 connection on a Windows XP machine? I ask this because we may have some clients that do work right now but will fail when the third party disables TLS 1.0 due to having Win XP or Win Vista clients.
2) What would prevent a handshake on PCs similar to another PC with the same OS allowing the handshake? Here is the snippet of the log where the handshake fails:
clientHandshake(20000ms): The client cert chain is NULL. cacheClientCerts: Cached TLS client certificates. Client cert chain is NULL. --cacheClientCerts clientHandshake2(20000ms): readHandshakeMessages(20000ms): sockRecv: Socket operation timeout. Failed to read beginning of SSL/TLS record. b: 0 dbSize: 0 nReadNBytes: 0 --readHandshakeMessages --clientHandshake2 --clientHandshake Client handshake failed. (3)
Here is a successful handshake log (I have forced Chilkat to use TLS 1.2 protocol in the test):
clientHandshake(203ms): The client cert chain is NULL. cacheClientCerts: Cached TLS client certificates. Client cert chain is NULL. --cacheClientCertsclientHandshake2(203ms): readHandshakeMessages(78ms): processHandshakeRecord: processHandshakeMessage: processServerHello: negotiatedTlsVersion: TLS 1.2 negotiatedCipherSuite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 minAcceptableRsaKeySize: 1024 --processServerHello --processHandshakeMessage --processHandshakeRecord --readHandshakeMessages Sending 0-length certificate (this is normal). sendClientCertificates: buildCertificatesMessage: numCerts: 0 --buildCertificatesMessage --sendClientCertificates buildClientKeyExchange(16ms): buildClientKeyExchangeECDHE(16ms): verifyServerKeyExchange: verifyHash: keyType: Public hashInSize: 32 padding: PKCS v1.5 HashOid: 2.16.840.1.101.3.4.2.1 --verifyHash --verifyServerKeyExchange Verified server key exchange. generateNewKey_ecc(16ms): loadCurveByName: name: secp256r1 --loadCurveByName --generateNewKey_ecc loadSshPubKey: loadCurveByName: name: secp256r1 --loadCurveByName --loadSshPubKey --buildClientKeyExchangeECDHE --buildClientKeyExchange --clientHandshake2 --clientHandshake
Both the successful and erroring clients are running version 9.5.0.64 of the Chilkat ActiveX single DLL, so it does not seem to be version issue. Both clients are Win 7 Pro 32 bit as well.
Blank email message body causes email to be treated as a forwarded message
A user of my software reported the following new behavior after upgrading to a newer version (using a more recent ActiveX Chilkat component: 9.5.0.58). If the email message body is left blank, the email server (Office 365) which is set to add a text footer ("This electronic message transmission...") delivers a message with just the text footer and, below that, the original message (with a pdf attachment) shows up as a forwarded message. Is this a recently introduced bug?
Set password for files appended inside zip file
Hi,
Why are the files not password protected with below code:
chilkatZip As Zip = New Zip() chilkatZip.UnlockComponent(ChilkatLicense) chilkatZip.FileName = zipFileName chilkatZip.AppendOneFileOrDir(fileName, True) chilkatZip.Zipx = True chilkatZip.ZipxDefaultAlg = "bzip2" chilkatZip.Encryption = EncryptionAlgorithm.PkzipWeak chilkatZip.SetPassword("password") chilkatZip.SetCompressionLevel(9) chilkatZip.WriteZipAndClose()
Please suggest the appropriate way to apply password for all the files inside zip file.
Chilkat version used - 9.5.0.64
Thanks, Harshal A.
CkSocket Receive method not receiving bytes, however Wireshark shows differently..
Hello, I'm currently in a bit of a problem.
I'm trying to simply connect to a hostname/port provided and receive the string "pong" upon connecting and after sending "pingservice".
It seems to never be received and the debug from lastErrorText is extremely vague, even with verboseLogging on:
[2016-12-22 07:43:37] [ok] [PingLoop] Host 1 | Hostname : xx | Port: 2550 | Location: 2
[2016-12-22 07:43:37] [ok] [PingLoop] String sent!
[2016-12-22 07:43:47] [ok] [PingLoop] Couldn't recv. Debug:
ChilkatLog:
Close(31ms):
ChilkatVersion: 9.5.0.64
terminateConnection(31ms):
TCP connection cleanly closed by peer.
Cleanly terminated TCP connection.
--terminateConnection
--Close
--ChilkatLog
However. I find this strange since I decided to do a bit of debugging on my own using Wireshark (as it's not a SSL protected connection) and low-behold, the bytes "pong" are in several of the packets coming from the hostname I'm connected to.
http://i.imgur.com/A6oTsSW.png
However, it never seems like Chilkat recognizes this and cannot read the data.
Here is the code snippet provided:
g_Socket.put_VerboseLogging(true);
for (int i = 0; i < size; i++)
{
auto host = hosts.Get(i);
const char* hostname = host.hostname().c_str();
int port = host.port();
Location location = host.location();
cout << "Host " << i << " | Hostname: " << hostname << " | Port: " << port << " | Location: " << (int)location << endl;
Log("[PingLoop] Host " + std::to_string(i) + " | Hostname : " + string(hostname) + " | Port: " + std::to_string(port) + " | Location: " + std::to_string((int)location), LogLevelFlags::SUCCESS);
bool success = g_Socket.Connect(hostname, port, false, 10000);
g_Socket.put_MaxReadIdleMs(10000);
g_Socket.put_MaxSendIdleMs(10000);
if (success)
{
auto start = std::chrono::high_resolution_clock::now();
if (g_Socket.SendString("pingservice"))
{
Log("[PingLoop] String sent!", LogLevelFlags::SUCCESS);
CkByteData byteData;
if(g_Socket.ReceiveBytes(byteData))
{
Log("[PingLoop] recv", LogLevelFlags::SUCCESS);
newLatencies[location] = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start).count();
Log("[PingLoop] Took " + std::to_string(newLatencies[location]) + " ms", LogLevelFlags::SUCCESS);
}
else
{
g_Socket.Close(TIMEOUT);
newLatencies[location] = TIMEOUT;
Log("[PingLoop] Couldn't recv. Debug:\n" + string(g_Socket.lastErrorText()), LogLevelFlags::SUCCESS);
continue;
}
What exactly am I doing wrong here? I've tried ReceiveString before, still same result. Receiving doesn't seem to work, but sending does.
Any bit of help would be much appreciated ^^
subclassing in C++
Are there any limitations on subclassing Ck*-classes within C++/C++11 environment ? Any trap to watch out or free to do ?
I'm right now looking specifically into subclassing of CkJsonObject and its colleagues.
Feature request: any plan to implement a small HTTP/HTTPS server in the library ?
Is there a plan to include a small web server into the lib ? I would looking for a function allowing to serve simple websites to a local browser and to use HTML, JS and UI to an else service running in background.
Any proven good alternatives ?
Encoding bug in 7bit mail for FetchSingleAsMimeAsync
I'm getting mail data with FetchSingleAsMimeAsync. There are some mails which say
Content-transfer-encoding: 7bit
in their header. But this isn't the case as they have so-called "high ascii" characters in the body. The Chilkat plugin GETS the data as WindowsANSI but DEFINES the encoding as UTF8. When I reverse this I get the correctly encoded data:
currentBody = currentBody.ConvertEncoding(Encodings.WindowsANSI)
currentBody = currentBody.DefineEncoding(Encodings.UTF8)
This usually is a big no-no for encodings but here it unscrambles the data. I have the workaround in place. But I know from a similar occurrence of this problem that changing the encoding takes a long time.
Xojo 2016r4, Mac OS 10.11.6, Chilkat plugin from 23.06.2016
Regards
Beatrix Willius
WebDav List my Files
Hello, I want to log on to my online storage (cloud) and let any existing files to display in a ListView. I do not know of with HTTP and am in a newcomer.
All examples here lead not me and not get to the target. Can anyone give an example of how I can log in and the files can list me?
Please help Christian
Problem Receiving RTF Email Format Attachments....
We are using the Chilkat software (ChilkatDotNet2.dll) version 9.2.1.0 for one of our applications to get the email attachments and save them to our local windows drive.
Our clients send the PDF attachments in an email with the message format - RTF (Rich Text Format) and the Chilkat software is reading the PDF attachments (of the email that is sent in RTF) as a single attachment with the file - winmail.dat & returning the attachment content type as ""application/ms-tnef"". However, the receiver's email inbox contains the PDF attachments of the RTF email message format and not the winmail.dat file but Chilkat software is reading the attachment as winmail.dat.
How Chilkat handles the attachments of the RTF email message format?
Open SSH session and monitor for specific text
Good afternoon All,
I am looking to connect to my phone system through an SSH session (no need to log in) and monitor for specific text to be output. If the text is fount then grab all additional text until another specific string of text is encountered then e-mail the grabbed text. I am looking for the text that gets output when someone dials 911. The subsequent text shows the time/date/name/phone number/location for who place the 911 call.
I am using VB2015 and I am one of those people who knows just enough to be dangerous. :P
I am having a bit of trouble figuring out how to open an SSH session and then having the program monitor for the specific text to come through. I was hoping someone might have a suggestion about how to proceed or where to look for pertinent documentation. I've played around with parsing text/e-mailing and I am pretty comfortable with that.
Any help/advice would be greatly appreciated.
Vr
Mike