@chilkat/react-native 11.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/ChilkatRN.podspec +44 -0
- package/LICENSE +254 -0
- package/README.md +67 -0
- package/android/CMakeLists.txt +60 -0
- package/android/build.gradle +148 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +12 -0
- package/android/src/main/java/com/margelo/nitro/chilkat/ChilkatRNPackage.java +33 -0
- package/chilkat-checksums.json +9 -0
- package/cpp/HybridAi.cpp +660 -0
- package/cpp/HybridAi.hpp +159 -0
- package/cpp/HybridAsn.cpp +403 -0
- package/cpp/HybridAsn.hpp +105 -0
- package/cpp/HybridAuthAws.cpp +188 -0
- package/cpp/HybridAuthAws.hpp +55 -0
- package/cpp/HybridAuthAzureSAS.cpp +142 -0
- package/cpp/HybridAuthAzureSAS.hpp +47 -0
- package/cpp/HybridAuthAzureStorage.cpp +144 -0
- package/cpp/HybridAuthAzureStorage.hpp +47 -0
- package/cpp/HybridAuthGoogle.cpp +215 -0
- package/cpp/HybridAuthGoogle.hpp +67 -0
- package/cpp/HybridBinData.cpp +439 -0
- package/cpp/HybridBinData.hpp +112 -0
- package/cpp/HybridBz2.cpp +177 -0
- package/cpp/HybridBz2.hpp +58 -0
- package/cpp/HybridCache.cpp +314 -0
- package/cpp/HybridCache.hpp +82 -0
- package/cpp/HybridCert.cpp +840 -0
- package/cpp/HybridCert.hpp +196 -0
- package/cpp/HybridCertChain.cpp +149 -0
- package/cpp/HybridCertChain.hpp +50 -0
- package/cpp/HybridCertStore.cpp +276 -0
- package/cpp/HybridCertStore.hpp +78 -0
- package/cpp/HybridCharset.cpp +333 -0
- package/cpp/HybridCharset.hpp +83 -0
- package/cpp/HybridCkDateTime.cpp +384 -0
- package/cpp/HybridCkDateTime.hpp +105 -0
- package/cpp/HybridCodeSign.cpp +156 -0
- package/cpp/HybridCodeSign.hpp +55 -0
- package/cpp/HybridCompression.cpp +422 -0
- package/cpp/HybridCompression.hpp +100 -0
- package/cpp/HybridCrypt2.cpp +1517 -0
- package/cpp/HybridCrypt2.hpp +320 -0
- package/cpp/HybridCsr.cpp +292 -0
- package/cpp/HybridCsr.hpp +77 -0
- package/cpp/HybridCsv.cpp +382 -0
- package/cpp/HybridCsv.hpp +101 -0
- package/cpp/HybridDh.cpp +137 -0
- package/cpp/HybridDh.hpp +47 -0
- package/cpp/HybridDirTree.cpp +167 -0
- package/cpp/HybridDirTree.hpp +53 -0
- package/cpp/HybridDkim.cpp +249 -0
- package/cpp/HybridDkim.hpp +74 -0
- package/cpp/HybridDns.cpp +193 -0
- package/cpp/HybridDns.hpp +64 -0
- package/cpp/HybridDsa.cpp +453 -0
- package/cpp/HybridDsa.hpp +112 -0
- package/cpp/HybridDtObj.cpp +172 -0
- package/cpp/HybridDtObj.hpp +57 -0
- package/cpp/HybridEcc.cpp +195 -0
- package/cpp/HybridEcc.hpp +55 -0
- package/cpp/HybridEdDSA.cpp +147 -0
- package/cpp/HybridEdDSA.hpp +47 -0
- package/cpp/HybridEmail.cpp +1911 -0
- package/cpp/HybridEmail.hpp +419 -0
- package/cpp/HybridEmailBundle.cpp +204 -0
- package/cpp/HybridEmailBundle.hpp +64 -0
- package/cpp/HybridFileAccess.cpp +631 -0
- package/cpp/HybridFileAccess.hpp +149 -0
- package/cpp/HybridFtp2.cpp +2308 -0
- package/cpp/HybridFtp2.hpp +462 -0
- package/cpp/HybridGlobal.cpp +221 -0
- package/cpp/HybridGlobal.hpp +68 -0
- package/cpp/HybridGzip.cpp +440 -0
- package/cpp/HybridGzip.hpp +105 -0
- package/cpp/HybridHashtable.cpp +211 -0
- package/cpp/HybridHashtable.hpp +64 -0
- package/cpp/HybridHtmlToText.cpp +136 -0
- package/cpp/HybridHtmlToText.hpp +47 -0
- package/cpp/HybridHtmlToXml.cpp +218 -0
- package/cpp/HybridHtmlToXml.hpp +65 -0
- package/cpp/HybridHttp.cpp +2067 -0
- package/cpp/HybridHttp.hpp +416 -0
- package/cpp/HybridHttpCurl.cpp +337 -0
- package/cpp/HybridHttpCurl.hpp +93 -0
- package/cpp/HybridHttpRequest.cpp +455 -0
- package/cpp/HybridHttpRequest.hpp +109 -0
- package/cpp/HybridHttpResponse.cpp +340 -0
- package/cpp/HybridHttpResponse.hpp +86 -0
- package/cpp/HybridImap.cpp +1818 -0
- package/cpp/HybridImap.hpp +363 -0
- package/cpp/HybridJavaKeyStore.cpp +387 -0
- package/cpp/HybridJavaKeyStore.hpp +98 -0
- package/cpp/HybridJs.cpp +154 -0
- package/cpp/HybridJs.hpp +54 -0
- package/cpp/HybridJsonArray.cpp +441 -0
- package/cpp/HybridJsonArray.hpp +120 -0
- package/cpp/HybridJsonObject.cpp +1125 -0
- package/cpp/HybridJsonObject.hpp +260 -0
- package/cpp/HybridJwe.cpp +294 -0
- package/cpp/HybridJwe.hpp +82 -0
- package/cpp/HybridJws.cpp +290 -0
- package/cpp/HybridJws.hpp +82 -0
- package/cpp/HybridJwt.cpp +198 -0
- package/cpp/HybridJwt.hpp +57 -0
- package/cpp/HybridLog.cpp +212 -0
- package/cpp/HybridLog.hpp +63 -0
- package/cpp/HybridMailMan.cpp +1853 -0
- package/cpp/HybridMailMan.hpp +386 -0
- package/cpp/HybridMailboxes.cpp +165 -0
- package/cpp/HybridMailboxes.hpp +54 -0
- package/cpp/HybridMcp.cpp +322 -0
- package/cpp/HybridMcp.hpp +85 -0
- package/cpp/HybridMessageSet.cpp +162 -0
- package/cpp/HybridMessageSet.hpp +54 -0
- package/cpp/HybridMht.cpp +700 -0
- package/cpp/HybridMht.hpp +165 -0
- package/cpp/HybridMime.cpp +1119 -0
- package/cpp/HybridMime.hpp +266 -0
- package/cpp/HybridNtlm.cpp +333 -0
- package/cpp/HybridNtlm.hpp +83 -0
- package/cpp/HybridOAuth1.cpp +307 -0
- package/cpp/HybridOAuth1.hpp +78 -0
- package/cpp/HybridOAuth2.cpp +515 -0
- package/cpp/HybridOAuth2.hpp +127 -0
- package/cpp/HybridPdf.cpp +370 -0
- package/cpp/HybridPdf.hpp +103 -0
- package/cpp/HybridPem.cpp +327 -0
- package/cpp/HybridPem.hpp +88 -0
- package/cpp/HybridPfx.cpp +343 -0
- package/cpp/HybridPfx.hpp +87 -0
- package/cpp/HybridPkcs11.cpp +318 -0
- package/cpp/HybridPkcs11.hpp +88 -0
- package/cpp/HybridPrivateKey.cpp +464 -0
- package/cpp/HybridPrivateKey.hpp +117 -0
- package/cpp/HybridPrng.cpp +192 -0
- package/cpp/HybridPrng.hpp +57 -0
- package/cpp/HybridPublicKey.cpp +238 -0
- package/cpp/HybridPublicKey.hpp +68 -0
- package/cpp/HybridRest.cpp +993 -0
- package/cpp/HybridRest.hpp +214 -0
- package/cpp/HybridRsa.cpp +348 -0
- package/cpp/HybridRsa.hpp +90 -0
- package/cpp/HybridSCard.cpp +328 -0
- package/cpp/HybridSCard.hpp +91 -0
- package/cpp/HybridSFtp.cpp +1889 -0
- package/cpp/HybridSFtp.hpp +366 -0
- package/cpp/HybridSFtpDir.cpp +119 -0
- package/cpp/HybridSFtpDir.hpp +43 -0
- package/cpp/HybridSFtpFile.cpp +203 -0
- package/cpp/HybridSFtpFile.hpp +60 -0
- package/cpp/HybridScMinidriver.cpp +341 -0
- package/cpp/HybridScMinidriver.hpp +88 -0
- package/cpp/HybridScp.cpp +398 -0
- package/cpp/HybridScp.hpp +96 -0
- package/cpp/HybridSecrets.cpp +328 -0
- package/cpp/HybridSecrets.hpp +84 -0
- package/cpp/HybridSecureString.cpp +175 -0
- package/cpp/HybridSecureString.hpp +55 -0
- package/cpp/HybridServerSentEvent.cpp +112 -0
- package/cpp/HybridServerSentEvent.hpp +41 -0
- package/cpp/HybridSocket.cpp +1567 -0
- package/cpp/HybridSocket.hpp +336 -0
- package/cpp/HybridSpider.cpp +543 -0
- package/cpp/HybridSpider.hpp +138 -0
- package/cpp/HybridSsh.cpp +1330 -0
- package/cpp/HybridSsh.hpp +282 -0
- package/cpp/HybridSshKey.cpp +310 -0
- package/cpp/HybridSshKey.hpp +83 -0
- package/cpp/HybridSshTunnel.cpp +687 -0
- package/cpp/HybridSshTunnel.hpp +159 -0
- package/cpp/HybridStream.cpp +496 -0
- package/cpp/HybridStream.hpp +123 -0
- package/cpp/HybridStringArray.cpp +368 -0
- package/cpp/HybridStringArray.hpp +99 -0
- package/cpp/HybridStringBuilder.cpp +739 -0
- package/cpp/HybridStringBuilder.hpp +178 -0
- package/cpp/HybridStringTable.cpp +218 -0
- package/cpp/HybridStringTable.hpp +66 -0
- package/cpp/HybridTar.cpp +547 -0
- package/cpp/HybridTar.hpp +134 -0
- package/cpp/HybridTrustedRoots.cpp +178 -0
- package/cpp/HybridTrustedRoots.hpp +61 -0
- package/cpp/HybridUnixCompress.cpp +191 -0
- package/cpp/HybridUnixCompress.hpp +60 -0
- package/cpp/HybridUpload.cpp +427 -0
- package/cpp/HybridUpload.hpp +114 -0
- package/cpp/HybridUrl.cpp +152 -0
- package/cpp/HybridUrl.hpp +48 -0
- package/cpp/HybridWebSocket.cpp +378 -0
- package/cpp/HybridWebSocket.hpp +103 -0
- package/cpp/HybridXml.cpp +1527 -0
- package/cpp/HybridXml.hpp +340 -0
- package/cpp/HybridXmlCertVault.cpp +215 -0
- package/cpp/HybridXmlCertVault.hpp +63 -0
- package/cpp/HybridXmlDSig.cpp +328 -0
- package/cpp/HybridXmlDSig.hpp +88 -0
- package/cpp/HybridXmlDSigGen.cpp +549 -0
- package/cpp/HybridXmlDSigGen.hpp +126 -0
- package/cpp/HybridXmp.cpp +329 -0
- package/cpp/HybridXmp.hpp +86 -0
- package/cpp/HybridZip.cpp +1000 -0
- package/cpp/HybridZip.hpp +226 -0
- package/cpp/HybridZipCrc.cpp +162 -0
- package/cpp/HybridZipCrc.hpp +57 -0
- package/cpp/HybridZipEntry.cpp +395 -0
- package/cpp/HybridZipEntry.hpp +102 -0
- package/cpp/runtime/AsyncCall.hpp +96 -0
- package/cpp/runtime/Bytes.hpp +49 -0
- package/cpp/runtime/ChilkatError.hpp +66 -0
- package/cpp/runtime/ChilkatObject.hpp +219 -0
- package/cpp/runtime/ProgLang.hpp +9 -0
- package/cpp/runtime/ProgressAdapter.hpp +43 -0
- package/nitro.json +113 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/ChilkatRN+autolinking.cmake +179 -0
- package/nitrogen/generated/android/ChilkatRN+autolinking.gradle +27 -0
- package/nitrogen/generated/android/ChilkatRNOnLoad.cpp +1029 -0
- package/nitrogen/generated/android/ChilkatRNOnLoad.hpp +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/chilkat/ChilkatRNOnLoad.kt +35 -0
- package/nitrogen/generated/ios/ChilkatRN+autolinking.rb +62 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Bridge.hpp +27 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Umbrella.hpp +38 -0
- package/nitrogen/generated/ios/ChilkatRNAutolinking.mm +1015 -0
- package/nitrogen/generated/ios/ChilkatRNAutolinking.swift +16 -0
- package/nitrogen/generated/shared/c++/HybridAiSpec.cpp +114 -0
- package/nitrogen/generated/shared/c++/HybridAiSpec.hpp +175 -0
- package/nitrogen/generated/shared/c++/HybridAsnSpec.cpp +70 -0
- package/nitrogen/generated/shared/c++/HybridAsnSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridAuthAwsSpec.cpp +49 -0
- package/nitrogen/generated/shared/c++/HybridAuthAwsSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureSASSpec.cpp +38 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureSASSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureStorageSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureStorageSpec.hpp +81 -0
- package/nitrogen/generated/shared/c++/HybridAuthGoogleSpec.cpp +56 -0
- package/nitrogen/generated/shared/c++/HybridAuthGoogleSpec.hpp +108 -0
- package/nitrogen/generated/shared/c++/HybridBinDataSpec.cpp +69 -0
- package/nitrogen/generated/shared/c++/HybridBinDataSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridBz2Spec.cpp +47 -0
- package/nitrogen/generated/shared/c++/HybridBz2Spec.hpp +93 -0
- package/nitrogen/generated/shared/c++/HybridCacheSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridCacheSpec.hpp +106 -0
- package/nitrogen/generated/shared/c++/HybridCertChainSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridCertChainSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridCertSpec.cpp +138 -0
- package/nitrogen/generated/shared/c++/HybridCertSpec.hpp +205 -0
- package/nitrogen/generated/shared/c++/HybridCertStoreSpec.cpp +55 -0
- package/nitrogen/generated/shared/c++/HybridCertStoreSpec.hpp +104 -0
- package/nitrogen/generated/shared/c++/HybridCharsetSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridCharsetSpec.hpp +101 -0
- package/nitrogen/generated/shared/c++/HybridCkDateTimeSpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridCkDateTimeSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridCodeSignSpec.cpp +44 -0
- package/nitrogen/generated/shared/c++/HybridCodeSignSpec.hpp +93 -0
- package/nitrogen/generated/shared/c++/HybridCompressionSpec.cpp +79 -0
- package/nitrogen/generated/shared/c++/HybridCompressionSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridCrypt2Spec.cpp +215 -0
- package/nitrogen/generated/shared/c++/HybridCrypt2Spec.hpp +283 -0
- package/nitrogen/generated/shared/c++/HybridCsrSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridCsrSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridCsvSpec.cpp +72 -0
- package/nitrogen/generated/shared/c++/HybridCsvSpec.hpp +121 -0
- package/nitrogen/generated/shared/c++/HybridDhSpec.cpp +37 -0
- package/nitrogen/generated/shared/c++/HybridDhSpec.hpp +77 -0
- package/nitrogen/generated/shared/c++/HybridDirTreeSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridDirTreeSpec.hpp +86 -0
- package/nitrogen/generated/shared/c++/HybridDkimSpec.cpp +60 -0
- package/nitrogen/generated/shared/c++/HybridDkimSpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridDnsSpec.cpp +51 -0
- package/nitrogen/generated/shared/c++/HybridDnsSpec.hpp +97 -0
- package/nitrogen/generated/shared/c++/HybridDsaSpec.cpp +73 -0
- package/nitrogen/generated/shared/c++/HybridDsaSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridDtObjSpec.cpp +50 -0
- package/nitrogen/generated/shared/c++/HybridDtObjSpec.hpp +90 -0
- package/nitrogen/generated/shared/c++/HybridEccSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridEccSpec.hpp +96 -0
- package/nitrogen/generated/shared/c++/HybridEdDSASpec.cpp +38 -0
- package/nitrogen/generated/shared/c++/HybridEdDSASpec.hpp +90 -0
- package/nitrogen/generated/shared/c++/HybridEmailBundleSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridEmailBundleSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridEmailSpec.cpp +259 -0
- package/nitrogen/generated/shared/c++/HybridEmailSpec.hpp +326 -0
- package/nitrogen/generated/shared/c++/HybridFileAccessSpec.cpp +90 -0
- package/nitrogen/generated/shared/c++/HybridFileAccessSpec.hpp +140 -0
- package/nitrogen/generated/shared/c++/HybridFtp2Spec.cpp +367 -0
- package/nitrogen/generated/shared/c++/HybridFtp2Spec.hpp +434 -0
- package/nitrogen/generated/shared/c++/HybridGlobalSpec.cpp +59 -0
- package/nitrogen/generated/shared/c++/HybridGlobalSpec.hpp +99 -0
- package/nitrogen/generated/shared/c++/HybridGzipSpec.cpp +79 -0
- package/nitrogen/generated/shared/c++/HybridGzipSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridHashtableSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridHashtableSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToTextSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToTextSpec.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToXmlSpec.cpp +49 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToXmlSpec.hpp +95 -0
- package/nitrogen/generated/shared/c++/HybridHttpCurlSpec.cpp +67 -0
- package/nitrogen/generated/shared/c++/HybridHttpCurlSpec.hpp +125 -0
- package/nitrogen/generated/shared/c++/HybridHttpRequestSpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridHttpRequestSpec.hpp +122 -0
- package/nitrogen/generated/shared/c++/HybridHttpResponseSpec.cpp +64 -0
- package/nitrogen/generated/shared/c++/HybridHttpResponseSpec.hpp +119 -0
- package/nitrogen/generated/shared/c++/HybridHttpSpec.cpp +334 -0
- package/nitrogen/generated/shared/c++/HybridHttpSpec.hpp +407 -0
- package/nitrogen/generated/shared/c++/HybridImapSpec.cpp +275 -0
- package/nitrogen/generated/shared/c++/HybridImapSpec.hpp +360 -0
- package/nitrogen/generated/shared/c++/HybridJavaKeyStoreSpec.cpp +65 -0
- package/nitrogen/generated/shared/c++/HybridJavaKeyStoreSpec.hpp +132 -0
- package/nitrogen/generated/shared/c++/HybridJsSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridJsSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridJsonArraySpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridJsonArraySpec.hpp +131 -0
- package/nitrogen/generated/shared/c++/HybridJsonObjectSpec.cpp +154 -0
- package/nitrogen/generated/shared/c++/HybridJsonObjectSpec.hpp +218 -0
- package/nitrogen/generated/shared/c++/HybridJweSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridJweSpec.hpp +112 -0
- package/nitrogen/generated/shared/c++/HybridJwsSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridJwsSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridJwtSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridJwtSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridLogSpec.cpp +44 -0
- package/nitrogen/generated/shared/c++/HybridLogSpec.hpp +85 -0
- package/nitrogen/generated/shared/c++/HybridMailManSpec.cpp +311 -0
- package/nitrogen/generated/shared/c++/HybridMailManSpec.hpp +396 -0
- package/nitrogen/generated/shared/c++/HybridMailboxesSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridMailboxesSpec.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridMcpSpec.cpp +68 -0
- package/nitrogen/generated/shared/c++/HybridMcpSpec.hpp +117 -0
- package/nitrogen/generated/shared/c++/HybridMessageSetSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridMessageSetSpec.hpp +84 -0
- package/nitrogen/generated/shared/c++/HybridMhtSpec.cpp +138 -0
- package/nitrogen/generated/shared/c++/HybridMhtSpec.hpp +181 -0
- package/nitrogen/generated/shared/c++/HybridMimeSpec.cpp +169 -0
- package/nitrogen/generated/shared/c++/HybridMimeSpec.hpp +233 -0
- package/nitrogen/generated/shared/c++/HybridNtlmSpec.cpp +69 -0
- package/nitrogen/generated/shared/c++/HybridNtlmSpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridOAuth1Spec.cpp +67 -0
- package/nitrogen/generated/shared/c++/HybridOAuth1Spec.hpp +110 -0
- package/nitrogen/generated/shared/c++/HybridOAuth2Spec.cpp +107 -0
- package/nitrogen/generated/shared/c++/HybridOAuth2Spec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridPdfSpec.cpp +73 -0
- package/nitrogen/generated/shared/c++/HybridPdfSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridPemSpec.cpp +63 -0
- package/nitrogen/generated/shared/c++/HybridPemSpec.hpp +124 -0
- package/nitrogen/generated/shared/c++/HybridPfxSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridPfxSpec.hpp +122 -0
- package/nitrogen/generated/shared/c++/HybridPkcs11Spec.cpp +60 -0
- package/nitrogen/generated/shared/c++/HybridPkcs11Spec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridPrivateKeySpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridPrivateKeySpec.hpp +131 -0
- package/nitrogen/generated/shared/c++/HybridPrngSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridPrngSpec.hpp +85 -0
- package/nitrogen/generated/shared/c++/HybridPublicKeySpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridPublicKeySpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridRestSpec.cpp +150 -0
- package/nitrogen/generated/shared/c++/HybridRestSpec.hpp +229 -0
- package/nitrogen/generated/shared/c++/HybridRsaSpec.cpp +68 -0
- package/nitrogen/generated/shared/c++/HybridRsaSpec.hpp +120 -0
- package/nitrogen/generated/shared/c++/HybridSCardSpec.cpp +64 -0
- package/nitrogen/generated/shared/c++/HybridSCardSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridSFtpDirSpec.cpp +35 -0
- package/nitrogen/generated/shared/c++/HybridSFtpDirSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridSFtpFileSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridSFtpFileSpec.hpp +98 -0
- package/nitrogen/generated/shared/c++/HybridSFtpSpec.cpp +284 -0
- package/nitrogen/generated/shared/c++/HybridSFtpSpec.hpp +354 -0
- package/nitrogen/generated/shared/c++/HybridScMinidriverSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridScMinidriverSpec.hpp +119 -0
- package/nitrogen/generated/shared/c++/HybridScpSpec.cpp +78 -0
- package/nitrogen/generated/shared/c++/HybridScpSpec.hpp +127 -0
- package/nitrogen/generated/shared/c++/HybridSecretsSpec.cpp +65 -0
- package/nitrogen/generated/shared/c++/HybridSecretsSpec.hpp +120 -0
- package/nitrogen/generated/shared/c++/HybridSecureStringSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridSecureStringSpec.hpp +88 -0
- package/nitrogen/generated/shared/c++/HybridServerSentEventSpec.cpp +35 -0
- package/nitrogen/generated/shared/c++/HybridServerSentEventSpec.hpp +75 -0
- package/nitrogen/generated/shared/c++/HybridSocketSpec.cpp +262 -0
- package/nitrogen/generated/shared/c++/HybridSocketSpec.hpp +327 -0
- package/nitrogen/generated/shared/c++/HybridSpiderSpec.cpp +110 -0
- package/nitrogen/generated/shared/c++/HybridSpiderSpec.hpp +153 -0
- package/nitrogen/generated/shared/c++/HybridSshKeySpec.cpp +59 -0
- package/nitrogen/generated/shared/c++/HybridSshKeySpec.hpp +102 -0
- package/nitrogen/generated/shared/c++/HybridSshSpec.cpp +215 -0
- package/nitrogen/generated/shared/c++/HybridSshSpec.hpp +276 -0
- package/nitrogen/generated/shared/c++/HybridSshTunnelSpec.cpp +136 -0
- package/nitrogen/generated/shared/c++/HybridSshTunnelSpec.hpp +191 -0
- package/nitrogen/generated/shared/c++/HybridStreamSpec.cpp +100 -0
- package/nitrogen/generated/shared/c++/HybridStreamSpec.hpp +150 -0
- package/nitrogen/generated/shared/c++/HybridStringArraySpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridStringArraySpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridStringBuilderSpec.cpp +104 -0
- package/nitrogen/generated/shared/c++/HybridStringBuilderSpec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridStringTableSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridStringTableSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridTarSpec.cpp +110 -0
- package/nitrogen/generated/shared/c++/HybridTarSpec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridTrustedRootsSpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridTrustedRootsSpec.hpp +97 -0
- package/nitrogen/generated/shared/c++/HybridUnixCompressSpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridUnixCompressSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridUploadSpec.cpp +98 -0
- package/nitrogen/generated/shared/c++/HybridUploadSpec.hpp +141 -0
- package/nitrogen/generated/shared/c++/HybridUrlSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridUrlSpec.hpp +82 -0
- package/nitrogen/generated/shared/c++/HybridWebSocketSpec.cpp +80 -0
- package/nitrogen/generated/shared/c++/HybridWebSocketSpec.hpp +135 -0
- package/nitrogen/generated/shared/c++/HybridXmlCertVaultSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridXmlCertVaultSpec.hpp +94 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigGenSpec.cpp +99 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigGenSpec.hpp +163 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigSpec.cpp +62 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigSpec.hpp +126 -0
- package/nitrogen/generated/shared/c++/HybridXmlSpec.cpp +203 -0
- package/nitrogen/generated/shared/c++/HybridXmlSpec.hpp +253 -0
- package/nitrogen/generated/shared/c++/HybridXmpSpec.cpp +58 -0
- package/nitrogen/generated/shared/c++/HybridXmpSpec.hpp +104 -0
- package/nitrogen/generated/shared/c++/HybridZipCrcSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridZipCrcSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridZipEntrySpec.cpp +82 -0
- package/nitrogen/generated/shared/c++/HybridZipEntrySpec.hpp +137 -0
- package/nitrogen/generated/shared/c++/HybridZipSpec.cpp +176 -0
- package/nitrogen/generated/shared/c++/HybridZipSpec.hpp +231 -0
- package/package.json +46 -0
- package/react-native.config.js +9 -0
- package/scripts/fetch-chilkat.js +184 -0
- package/src/index.ts +306 -0
- package/src/runtime/chilkat.ts +25 -0
- package/src/specs/Ai.nitro.ts +1288 -0
- package/src/specs/Asn.nitro.ts +509 -0
- package/src/specs/AuthAws.nitro.ts +234 -0
- package/src/specs/AuthAzureSAS.nitro.ts +205 -0
- package/src/specs/AuthAzureStorage.nitro.ts +172 -0
- package/src/specs/AuthGoogle.nitro.ts +291 -0
- package/src/specs/BinData.nitro.ts +470 -0
- package/src/specs/Bz2.nitro.ts +269 -0
- package/src/specs/Cache.nitro.ts +483 -0
- package/src/specs/Cert.nitro.ts +1279 -0
- package/src/specs/CertChain.nitro.ts +312 -0
- package/src/specs/CertStore.nitro.ts +430 -0
- package/src/specs/Charset.nitro.ts +518 -0
- package/src/specs/CkDateTime.nitro.ts +492 -0
- package/src/specs/CodeSign.nitro.ts +307 -0
- package/src/specs/Compression.nitro.ts +654 -0
- package/src/specs/Crypt2.nitro.ts +2387 -0
- package/src/specs/Csr.nitro.ts +461 -0
- package/src/specs/Csv.nitro.ts +670 -0
- package/src/specs/Dh.nitro.ts +343 -0
- package/src/specs/DirTree.nitro.ts +332 -0
- package/src/specs/Dkim.nitro.ts +595 -0
- package/src/specs/Dns.nitro.ts +271 -0
- package/src/specs/Dsa.nitro.ts +653 -0
- package/src/specs/DtObj.nitro.ts +198 -0
- package/src/specs/Ecc.nitro.ts +375 -0
- package/src/specs/EdDSA.nitro.ts +273 -0
- package/src/specs/Email.nitro.ts +2921 -0
- package/src/specs/EmailBundle.nitro.ts +334 -0
- package/src/specs/FileAccess.nitro.ts +836 -0
- package/src/specs/Ftp2.nitro.ts +3943 -0
- package/src/specs/Global.nitro.ts +319 -0
- package/src/specs/Gzip.nitro.ts +646 -0
- package/src/specs/Hashtable.nitro.ts +356 -0
- package/src/specs/HtmlToText.nitro.ts +238 -0
- package/src/specs/HtmlToXml.nitro.ts +323 -0
- package/src/specs/Http.nitro.ts +3095 -0
- package/src/specs/HttpCurl.nitro.ts +550 -0
- package/src/specs/HttpRequest.nitro.ts +522 -0
- package/src/specs/HttpResponse.nitro.ts +424 -0
- package/src/specs/Imap.nitro.ts +2991 -0
- package/src/specs/JavaKeyStore.nitro.ts +619 -0
- package/src/specs/Js.nitro.ts +263 -0
- package/src/specs/JsonArray.nitro.ts +681 -0
- package/src/specs/JsonObject.nitro.ts +1454 -0
- package/src/specs/Jwe.nitro.ts +756 -0
- package/src/specs/Jws.nitro.ts +733 -0
- package/src/specs/Jwt.nitro.ts +380 -0
- package/src/specs/Log.nitro.ts +258 -0
- package/src/specs/MailMan.nitro.ts +3571 -0
- package/src/specs/Mailboxes.nitro.ts +251 -0
- package/src/specs/Mcp.nitro.ts +491 -0
- package/src/specs/MessageSet.nitro.ts +320 -0
- package/src/specs/Mht.nitro.ts +1684 -0
- package/src/specs/Mime.nitro.ts +1745 -0
- package/src/specs/Ntlm.nitro.ts +556 -0
- package/src/specs/OAuth1.nitro.ts +331 -0
- package/src/specs/OAuth2.nitro.ts +1023 -0
- package/src/specs/Pdf.nitro.ts +740 -0
- package/src/specs/Pem.nitro.ts +484 -0
- package/src/specs/Pfx.nitro.ts +1003 -0
- package/src/specs/Pkcs11.nitro.ts +559 -0
- package/src/specs/PrivateKey.nitro.ts +994 -0
- package/src/specs/Prng.nitro.ts +348 -0
- package/src/specs/PublicKey.nitro.ts +610 -0
- package/src/specs/Rest.nitro.ts +1972 -0
- package/src/specs/Rsa.nitro.ts +453 -0
- package/src/specs/SCard.nitro.ts +739 -0
- package/src/specs/SFtp.nitro.ts +3138 -0
- package/src/specs/SFtpDir.nitro.ts +213 -0
- package/src/specs/SFtpFile.nitro.ts +452 -0
- package/src/specs/ScMinidriver.nitro.ts +443 -0
- package/src/specs/Scp.nitro.ts +708 -0
- package/src/specs/Secrets.nitro.ts +470 -0
- package/src/specs/SecureString.nitro.ts +231 -0
- package/src/specs/ServerSentEvent.nitro.ts +183 -0
- package/src/specs/Socket.nitro.ts +3335 -0
- package/src/specs/Spider.nitro.ts +609 -0
- package/src/specs/Ssh.nitro.ts +2842 -0
- package/src/specs/SshKey.nitro.ts +740 -0
- package/src/specs/SshTunnel.nitro.ts +1243 -0
- package/src/specs/Stream.nitro.ts +737 -0
- package/src/specs/StringArray.nitro.ts +396 -0
- package/src/specs/StringBuilder.nitro.ts +920 -0
- package/src/specs/StringTable.nitro.ts +271 -0
- package/src/specs/Tar.nitro.ts +804 -0
- package/src/specs/TrustedRoots.nitro.ts +360 -0
- package/src/specs/UnixCompress.nitro.ts +293 -0
- package/src/specs/Upload.nitro.ts +623 -0
- package/src/specs/Url.nitro.ts +246 -0
- package/src/specs/WebSocket.nitro.ts +840 -0
- package/src/specs/Xml.nitro.ts +1988 -0
- package/src/specs/XmlCertVault.nitro.ts +259 -0
- package/src/specs/XmlDSig.nitro.ts +464 -0
- package/src/specs/XmlDSigGen.nitro.ts +978 -0
- package/src/specs/Xmp.nitro.ts +364 -0
- package/src/specs/Zip.nitro.ts +1611 -0
- package/src/specs/ZipCrc.nitro.ts +229 -0
- package/src/specs/ZipEntry.nitro.ts +782 -0
|
@@ -0,0 +1,2921 @@
|
|
|
1
|
+
// Generated by ReactNativeNs.RnGenerator -- do not edit.
|
|
2
|
+
import type { HybridObject } from 'react-native-nitro-modules'
|
|
3
|
+
import type { BinData } from './BinData.nitro'
|
|
4
|
+
import type { Cert } from './Cert.nitro'
|
|
5
|
+
import type { CkDateTime } from './CkDateTime.nitro'
|
|
6
|
+
import type { JsonObject } from './JsonObject.nitro'
|
|
7
|
+
import type { PrivateKey } from './PrivateKey.nitro'
|
|
8
|
+
import type { StringBuilder } from './StringBuilder.nitro'
|
|
9
|
+
import type { StringTable } from './StringTable.nitro'
|
|
10
|
+
import type { XmlCertVault } from './XmlCertVault.nitro'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Create, inspect, modify, secure, load, and save complete email messages.
|
|
14
|
+
*
|
|
15
|
+
* `Email` represents a complete MIME email message,
|
|
16
|
+
* including headers, sender and recipient fields, subject, plain-text and HTML
|
|
17
|
+
* bodies, attachments, embedded HTML resources, attached messages, custom
|
|
18
|
+
* headers, and security-related information such as S/MIME signing and
|
|
19
|
+
* encryption status. It is the message object used throughout Chilkat when
|
|
20
|
+
* composing, parsing, modifying, saving, sending, receiving, or processing
|
|
21
|
+
* email.
|
|
22
|
+
*
|
|
23
|
+
* **Compose messages**
|
|
24
|
+
*
|
|
25
|
+
* Build email messages with sender, recipients, subject, text body, HTML
|
|
26
|
+
* body, reply-to fields, custom headers, and MIME structure.
|
|
27
|
+
*
|
|
28
|
+
* **Attachments and embedded content**
|
|
29
|
+
*
|
|
30
|
+
* Add, inspect, extract, remove, or save file attachments, embedded images,
|
|
31
|
+
* related HTML resources, and attached email messages.
|
|
32
|
+
*
|
|
33
|
+
* **Load and save MIME**
|
|
34
|
+
*
|
|
35
|
+
* Load email from MIME text, files, byte data, or strings, and save the
|
|
36
|
+
* message back to MIME, XML, files, or other supported forms.
|
|
37
|
+
*
|
|
38
|
+
* **Inspect received email**
|
|
39
|
+
*
|
|
40
|
+
* Read headers, addresses, dates, message IDs, body alternatives,
|
|
41
|
+
* attachments, encodings, and other fields from downloaded or parsed
|
|
42
|
+
* messages.
|
|
43
|
+
*
|
|
44
|
+
* **S/MIME security**
|
|
45
|
+
*
|
|
46
|
+
* Work with signed, encrypted, or signed-and-encrypted messages, including
|
|
47
|
+
* certificate-related information and security status.
|
|
48
|
+
*
|
|
49
|
+
* **Works with mail transports**
|
|
50
|
+
*
|
|
51
|
+
* Use `Email` objects with `MailMan`,
|
|
52
|
+
* `Imap`, `EmailBundle`, and related Chilkat classes
|
|
53
|
+
* for sending, receiving, downloading, and organizing mail.
|
|
54
|
+
*
|
|
55
|
+
* **Common pattern:**
|
|
56
|
+
* Use `Email` to represent and manipulate the message
|
|
57
|
+
* itself. Use transport classes such as `MailMan` or
|
|
58
|
+
* `Imap` to send, receive, fetch, or manage messages on mail
|
|
59
|
+
* servers. After downloading or creating an email, use this class to inspect
|
|
60
|
+
* headers, modify content, handle attachments, save MIME, or prepare the
|
|
61
|
+
* message for further processing.
|
|
62
|
+
*
|
|
63
|
+
* For an extended overview, see
|
|
64
|
+
* [Email Class Overview](https://www.chilkatsoft.com/email_class_overview.asp).
|
|
65
|
+
*
|
|
66
|
+
* Each `Email` instance owns a native Chilkat object. It is released when the JavaScript object is
|
|
67
|
+
* garbage collected, or immediately by `dispose()`; any use after `dispose()` throws.
|
|
68
|
+
* Create one with `new Email()`.
|
|
69
|
+
*/
|
|
70
|
+
export interface Email extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
71
|
+
// ---- Properties ----
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Provides HTML-formatted information about the last called method or property. If a method call
|
|
75
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
76
|
+
* available regardless of the method call's success.
|
|
77
|
+
*
|
|
78
|
+
* This property is read-only.
|
|
79
|
+
*/
|
|
80
|
+
readonly lastErrorHtml: string
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Provides plain text information about the last called method or property. If a method call
|
|
84
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
85
|
+
* available regardless of the method call's success.
|
|
86
|
+
*
|
|
87
|
+
* This property is read-only.
|
|
88
|
+
*/
|
|
89
|
+
readonly lastErrorText: string
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Provides XML-formatted information about the last called method or property. If a method call
|
|
93
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
94
|
+
* available regardless of the method call's success.
|
|
95
|
+
*
|
|
96
|
+
* This property is read-only.
|
|
97
|
+
*/
|
|
98
|
+
readonly lastErrorXml: string
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Version of the component/library, such as "10.1.0"
|
|
102
|
+
*
|
|
103
|
+
* This property is read-only.
|
|
104
|
+
*/
|
|
105
|
+
readonly version: string
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* If set to a file path, this property logs the LastErrorText of each Chilkat method or property
|
|
109
|
+
* call to the specified file. This logging helps identify the context and history of Chilkat
|
|
110
|
+
* calls leading up to any crash or hang, aiding in debugging.
|
|
111
|
+
*
|
|
112
|
+
* Enabling the VerboseLogging property provides more detailed information.
|
|
113
|
+
*
|
|
114
|
+
* This property is mainly used for debugging rare instances where a Chilkat method call causes a
|
|
115
|
+
* hang or crash, which should generally not happen.
|
|
116
|
+
*
|
|
117
|
+
* Possible causes of hangs include:
|
|
118
|
+
*
|
|
119
|
+
* - A timeout property set to 0, indicating an infinite timeout.
|
|
120
|
+
*
|
|
121
|
+
* - A hang occurring within an event callback in the application code.
|
|
122
|
+
*
|
|
123
|
+
* - An internal bug in the Chilkat code causing the hang.
|
|
124
|
+
*/
|
|
125
|
+
debugLogFilePath: string
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* If set to `true`, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may
|
|
129
|
+
* contain more verbose information. The default value is `false`. Verbose logging should only be
|
|
130
|
+
* used for debugging. The potentially large quantity of logged information may adversely affect
|
|
131
|
+
* peformance.
|
|
132
|
+
*/
|
|
133
|
+
verboseLogging: boolean
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Indicates the success or failure of the most recent method call: `true` means success, `false`
|
|
137
|
+
* means failure. This property remains unchanged by property setters or getters. This method is
|
|
138
|
+
* present to address challenges in checking for null or Nothing returns in certain programming
|
|
139
|
+
* languages. Note: This property does not apply to methods that return integer values or to
|
|
140
|
+
* boolean-returning methods where the boolean does not indicate success or failure.
|
|
141
|
+
*/
|
|
142
|
+
lastMethodSuccess: boolean
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Gets or sets the primary body of the email.
|
|
146
|
+
*
|
|
147
|
+
* When reading this property, an email containing both plain-text and HTML alternatives returns
|
|
148
|
+
* the HTML body. Use {@link Email.getHtmlBody} or {@link Email.getPlainTextBody} to retrieve a
|
|
149
|
+
* specific representation, and use {@link Email.hasHtmlBody} or {@link Email.hasPlainTextBody} to
|
|
150
|
+
* determine which representations are present.
|
|
151
|
+
*
|
|
152
|
+
* When setting this property, Chilkat inspects the supplied content to determine the body type.
|
|
153
|
+
* If the content is recognized as HTML, the HTML body is set. Otherwise, the plain-text body is
|
|
154
|
+
* set. If the email contains both plain-text and HTML alternatives, the corresponding alternative
|
|
155
|
+
* is replaced and the other alternative is left unchanged.
|
|
156
|
+
*
|
|
157
|
+
* For explicit control, use {@link Email.setTextBody}, {@link Email.setHtmlBody}, {@link
|
|
158
|
+
* Email.addPlainTextAlternativeBody}, or {@link Email.addHtmlAlternativeBody}.
|
|
159
|
+
*/
|
|
160
|
+
body: string
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Represents the main charset of the email, such as `utf-8`, `iso-8859-1`, `Shift_JIS`,
|
|
164
|
+
* `US-ASCII`, etc. This property can be empty if there is no explicit charset, such as for emails
|
|
165
|
+
* with only US-ASCII.
|
|
166
|
+
*
|
|
167
|
+
* Setting this property causes Chilkat to use the new charset in HTML and plain-text bodies,
|
|
168
|
+
* where possible. This can include updating the HTML META tag in HTML bodies to agree with the
|
|
169
|
+
* charset specified in the email header and also the byte representation of the HTML body in the
|
|
170
|
+
* email.
|
|
171
|
+
*
|
|
172
|
+
* Chilkat stores text internally as Unicode. This property mainly controls how body text is
|
|
173
|
+
* converted to bytes and labeled when MIME is generated.
|
|
174
|
+
*/
|
|
175
|
+
charset: string
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* `true` if the email arrived encrypted and was successfully decrypted, otherwise `false`. This
|
|
179
|
+
* property is only meaningful when the {@link Email.receivedEncrypted} property is equal to
|
|
180
|
+
* `true`.
|
|
181
|
+
*
|
|
182
|
+
* Check {@link Email.receivedEncrypted} first. A value of `false` can mean either that the
|
|
183
|
+
* message was not encrypted or that decryption did not succeed.
|
|
184
|
+
*
|
|
185
|
+
* This property is read-only.
|
|
186
|
+
*/
|
|
187
|
+
readonly decrypted: boolean
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The date/time from the `Date` header in the UTC/GMT timezone in RFC822 string form.
|
|
191
|
+
*
|
|
192
|
+
* For example: `Fri, 10 Jul 2026 20:15:30 GMT`.
|
|
193
|
+
*
|
|
194
|
+
* Setting this property updates the email's `Date` header.
|
|
195
|
+
*/
|
|
196
|
+
emailDateStr: string
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* If the email was received encrypted, this contains the details of the certificate used for
|
|
200
|
+
* encryption.
|
|
201
|
+
*
|
|
202
|
+
* This property is meaningful only when {@link Email.receivedEncrypted} is `true`. To obtain a
|
|
203
|
+
* certificate object rather than descriptive text, use `GetEncryptedByCert` or {@link
|
|
204
|
+
* Email.lastDecryptCert}.
|
|
205
|
+
*
|
|
206
|
+
* This property is read-only.
|
|
207
|
+
*/
|
|
208
|
+
readonly encryptedBy: string
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Set this property to send an email to a list of recipients stored in a plain text file. The
|
|
212
|
+
* file format is simple: one recipient per line, no comments allowed, blank lines are ignored.
|
|
213
|
+
* Setting this property is equivalent to adding a `CKX-FileDistList` header field to the email.
|
|
214
|
+
* `MailMan` treats header fields beginning with `CKX-` specially in that these fields are never
|
|
215
|
+
* transmitted with the email when sent. However, CKX fields are saved and restored when saving to
|
|
216
|
+
* XML or loading from XML (or MIME). When sending an email containing a `CKX-FileDistList` header
|
|
217
|
+
* field, `MailMan` will read the distribution list file and send the email to each recipient.
|
|
218
|
+
* Emails can be sent individually, or with BCC, 100 recipients at a time. (See the
|
|
219
|
+
* `MailMan.SendIndividual` property.)
|
|
220
|
+
*
|
|
221
|
+
* The distribution-list file is read when the message is sent, so the file must still exist and
|
|
222
|
+
* be accessible at that time. This feature is separate from the recipients stored in the normal
|
|
223
|
+
* To, Cc, and Bcc lists.
|
|
224
|
+
*/
|
|
225
|
+
fileDistList: string
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Contains the sender name and email address as they appear in the `From` header, such as `John
|
|
229
|
+
* Smith <john.smith@mail.com>`.
|
|
230
|
+
*
|
|
231
|
+
* If the sender identified by the `Sender` header field should differ from the visible `From`
|
|
232
|
+
* address, call {@link Email.addHeaderField} to set the `Sender` header field.
|
|
233
|
+
*
|
|
234
|
+
* `From`, {@link Email.fromName}, and {@link Email.fromAddress} are different views of the same
|
|
235
|
+
* MIME `From` header.
|
|
236
|
+
*/
|
|
237
|
+
from: string
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The email address of the sender.
|
|
241
|
+
*
|
|
242
|
+
* Changing this property updates the address portion of the MIME `From` header while preserving
|
|
243
|
+
* the sender name when possible.
|
|
244
|
+
*/
|
|
245
|
+
fromAddress: string
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* The name of the sender.
|
|
249
|
+
*
|
|
250
|
+
* Changing this property updates the display-name portion of the MIME `From` header while
|
|
251
|
+
* preserving the email address.
|
|
252
|
+
*/
|
|
253
|
+
fromName: string
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The complete MIME header of the email.
|
|
257
|
+
*
|
|
258
|
+
* This is the header generated from the current in-memory email object. Modify individual fields
|
|
259
|
+
* through the corresponding properties or header methods rather than attempting to assign to this
|
|
260
|
+
* read-only property.
|
|
261
|
+
*
|
|
262
|
+
* This property is read-only.
|
|
263
|
+
*/
|
|
264
|
+
readonly header: string
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Identifies the primary language group detected in the email subject and body text.
|
|
268
|
+
*
|
|
269
|
+
* - `latin1` — English and Western European languages
|
|
270
|
+
*
|
|
271
|
+
* - `central` — Central European languages, such as Polish, Czech, and Hungarian
|
|
272
|
+
*
|
|
273
|
+
* - `russian` — Cyrillic languages
|
|
274
|
+
*
|
|
275
|
+
* - `greek`, `turkish`, `hebrew`, `arabic`, `thai`, or `vietnamese`
|
|
276
|
+
*
|
|
277
|
+
* - `chinese`, `japanese`, or `korean`
|
|
278
|
+
*
|
|
279
|
+
* - `devanagari`, `bengali`, `gurmukhi`, `gujarati`, `oriya`, `tamil`, `telugu`, `kannada`,
|
|
280
|
+
* `malayalam`, or `sinhala`
|
|
281
|
+
*
|
|
282
|
+
* - `lao`, `tibetan`, `myanmar`, or `georgian`
|
|
283
|
+
*
|
|
284
|
+
* - `unknown`
|
|
285
|
+
*
|
|
286
|
+
* Characters in address and other MIME header fields are not considered. The {@link
|
|
287
|
+
* Email.subject} header has the greatest influence on the result. For example, an email with
|
|
288
|
+
* Japanese text in the subject and Russian text in the body is classified as `japanese`.
|
|
289
|
+
*
|
|
290
|
+
* The classification is based on the Unicode blocks containing the characters found in the email.
|
|
291
|
+
*
|
|
292
|
+
* This is a character-based heuristic intended to help choose encodings. It is not taken from the
|
|
293
|
+
* MIME `Content-Language` header and should not be treated as formal language detection.
|
|
294
|
+
*
|
|
295
|
+
* This property is read-only.
|
|
296
|
+
*/
|
|
297
|
+
readonly language: string
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* The date/time found in the `Date` header field returned in the local timezone in RFC822 string
|
|
301
|
+
* form.
|
|
302
|
+
*
|
|
303
|
+
* For example: `Fri, 10 Jul 2026 15:15:30 -0500`.
|
|
304
|
+
*
|
|
305
|
+
* Setting this property updates the email's `Date` header. Use `LocalDate` when a native local
|
|
306
|
+
* date/time value is preferred.
|
|
307
|
+
*/
|
|
308
|
+
localDateStr: string
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Identifies the email software that sent the email.
|
|
312
|
+
*
|
|
313
|
+
* This corresponds to the MIME `X-Mailer` header, which is informational and may be absent or
|
|
314
|
+
* supplied by the sending application.
|
|
315
|
+
*/
|
|
316
|
+
mailer: string
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The number of body representations present in the email. A representation may be plain text,
|
|
320
|
+
* HTML, iCalendar, or another body format.
|
|
321
|
+
*
|
|
322
|
+
* A normal email with one body generally returns `1`. A `multipart/alternative` email returns the
|
|
323
|
+
* number of alternatives contained in that enclosure. A newly created or cleared `Email` object
|
|
324
|
+
* also reports `1` for its default empty text body.
|
|
325
|
+
*
|
|
326
|
+
* An alternative is one of multiple representations of the same email body, such as plain text
|
|
327
|
+
* and HTML, within a `multipart/alternative` message.
|
|
328
|
+
*
|
|
329
|
+
* For example, an email containing plain-text and HTML alternatives, inline images, and an
|
|
330
|
+
* attachment may have a MIME structure similar to:
|
|
331
|
+
*
|
|
332
|
+
* ```
|
|
333
|
+
* multipart/mixed
|
|
334
|
+
* multipart/alternative
|
|
335
|
+
* text/plain
|
|
336
|
+
* multipart/related
|
|
337
|
+
* text/html
|
|
338
|
+
* image/png
|
|
339
|
+
* application/pdf
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* In this example, the `text/plain` part and the `multipart/related` part are alternatives. The
|
|
343
|
+
* `multipart/related` part contains the HTML body and an inline image, while the PDF is a
|
|
344
|
+
* separate attachment.
|
|
345
|
+
*
|
|
346
|
+
* Alternative indexes used by methods such as {@link Email.getAlternativeBody} are zero-based.
|
|
347
|
+
*
|
|
348
|
+
* This property is read-only.
|
|
349
|
+
*/
|
|
350
|
+
readonly numAlternatives: number
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* The number of embedded emails represented by `message/rfc822` MIME parts.
|
|
354
|
+
*
|
|
355
|
+
* Some mail clients attach a forwarded message as a complete nested email. These parts are
|
|
356
|
+
* counted separately from ordinary attachments and related items.
|
|
357
|
+
*
|
|
358
|
+
* Attached-message indexes are zero-based. Use {@link Email.getAttachedEmail} to copy an embedded
|
|
359
|
+
* message into another `Email` object. The deprecated `GetAttachedMessage` method also returns an
|
|
360
|
+
* independent copy.
|
|
361
|
+
*
|
|
362
|
+
* This property is read-only.
|
|
363
|
+
*/
|
|
364
|
+
readonly numAttachedMessages: number
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* The number of ordinary attachments contained in the email.
|
|
368
|
+
*
|
|
369
|
+
* Attachment indexes are zero-based. Related resources contained within a `multipart/related`
|
|
370
|
+
* enclosure are counted separately by {@link Email.numRelatedItems}, and embedded
|
|
371
|
+
* `message/rfc822` emails are counted by {@link Email.numAttachedMessages}.
|
|
372
|
+
*
|
|
373
|
+
* A MIME part outside a `multipart/related` enclosure may be classified as an attachment even
|
|
374
|
+
* when it does not explicitly contain `Content-Disposition: attachment`. MIME structure, content
|
|
375
|
+
* type, and disposition are considered together.
|
|
376
|
+
*
|
|
377
|
+
* **Note:** If an email is downloaded from an `Imap` server without attachment data, use the
|
|
378
|
+
* `Imap` method that reports attachment information for the server message. This property reports
|
|
379
|
+
* only the attachments actually present in the current `Email` object.
|
|
380
|
+
*
|
|
381
|
+
* This property is read-only.
|
|
382
|
+
*/
|
|
383
|
+
readonly numAttachments: number
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* The number of blind carbon-copy email recipients.
|
|
387
|
+
*
|
|
388
|
+
* Bcc recipient indexes are zero-based and can be inspected with {@link Email.getBcc}, {@link
|
|
389
|
+
* Email.getBccAddr}, and {@link Email.getBccName}.
|
|
390
|
+
*
|
|
391
|
+
* This property is read-only.
|
|
392
|
+
*/
|
|
393
|
+
readonly numBcc: number
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* The number of carbon-copy email recipients.
|
|
397
|
+
*
|
|
398
|
+
* Cc recipient indexes are zero-based and can be inspected with {@link Email.getCC}, {@link
|
|
399
|
+
* Email.getCcAddr}, and {@link Email.getCcName}.
|
|
400
|
+
*
|
|
401
|
+
* This property is read-only.
|
|
402
|
+
*/
|
|
403
|
+
readonly numCC: number
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Returns the number of days old from the current system date/time. The email's date is obtained
|
|
407
|
+
* from the `Date` header field. If the `Date` header field is missing, or invalid, then -9999 is
|
|
408
|
+
* returned. A negative number may be returned if the `Date` header field contains a future
|
|
409
|
+
* date/time. (However, -9999 represents an error condition.)
|
|
410
|
+
*
|
|
411
|
+
* The calculation uses the parsed `Date` header, not the time when the message was downloaded or
|
|
412
|
+
* loaded into the object.
|
|
413
|
+
*
|
|
414
|
+
* This property is read-only.
|
|
415
|
+
*/
|
|
416
|
+
readonly numDaysOld: number
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* The number of header fields. When accessing a header field by index, the first header field is
|
|
420
|
+
* at index 0, and the last is at NumHeaderFields-1. (Chilkat indexing is always 0-based.)
|
|
421
|
+
*
|
|
422
|
+
* Repeated header fields are counted separately. Use {@link Email.getHeaderFieldName} and {@link
|
|
423
|
+
* Email.getHeaderFieldValue} to enumerate them by zero-based index.
|
|
424
|
+
*
|
|
425
|
+
* This property is read-only.
|
|
426
|
+
*/
|
|
427
|
+
readonly numHeaderFields: number
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* The number of related MIME items present in the email. Related items are resources, such as
|
|
431
|
+
* images or style sheets, contained with an HTML body in a `multipart/related` enclosure.
|
|
432
|
+
*
|
|
433
|
+
* Related-item indexes are zero-based. These parts are distinct from ordinary attachments and are
|
|
434
|
+
* commonly referenced by HTML using a `cid:` URL or a `Content-Location` value.
|
|
435
|
+
*
|
|
436
|
+
* Classification is based primarily on the MIME structure. An inline disposition or `Content-ID`
|
|
437
|
+
* alone does not necessarily make a part a related item if it is outside the relevant
|
|
438
|
+
* `multipart/related` enclosure.
|
|
439
|
+
*
|
|
440
|
+
* This property is read-only.
|
|
441
|
+
*/
|
|
442
|
+
readonly numRelatedItems: number
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Returns the number of replacement patterns previously set by calling the {@link
|
|
446
|
+
* Email.setReplacePattern} method 1 or more times. If replacement patterns are set, the email
|
|
447
|
+
* bodies and header fields are modified by applying the search/replacement strings during the
|
|
448
|
+
* message sending process.
|
|
449
|
+
*
|
|
450
|
+
* Pattern indexes are zero-based. Replacement patterns are retained in the email object and
|
|
451
|
+
* applied later during supported mail-merge sending operations.
|
|
452
|
+
*
|
|
453
|
+
* This property is read-only.
|
|
454
|
+
*/
|
|
455
|
+
readonly numReplacePatterns: number
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Contains the number of report parts in a `multipart/report` email.
|
|
459
|
+
*
|
|
460
|
+
* A MIME part is counted as a report when its `Content-Type` is `message/*`, except for
|
|
461
|
+
* `message/rfc822`, or when its `Content-Type` is `text/rfc822-headers`. A `message/rfc822` part
|
|
462
|
+
* is treated as an attached email and is counted by {@link Email.numAttachedMessages}.
|
|
463
|
+
*
|
|
464
|
+
* Use {@link Email.getReport} to retrieve the body of each report part.
|
|
465
|
+
*
|
|
466
|
+
* Report indexes are zero-based. Use {@link Email.getReport} to retrieve the content of an
|
|
467
|
+
* individual report part.
|
|
468
|
+
*
|
|
469
|
+
* This property is read-only.
|
|
470
|
+
*/
|
|
471
|
+
readonly numReports: number
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* The number of direct email recipients.
|
|
475
|
+
*
|
|
476
|
+
* To-recipient indexes are zero-based and can be inspected with {@link Email.getTo}, {@link
|
|
477
|
+
* Email.getToAddr}, and {@link Email.getToName}.
|
|
478
|
+
*
|
|
479
|
+
* This property is read-only.
|
|
480
|
+
*/
|
|
481
|
+
readonly numTo: number
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* When `true` (the default) the methods to save email attachments and related items will
|
|
485
|
+
* overwrite files if they already exist. When `false`, the methods that save email attachments
|
|
486
|
+
* and related items will append a string of 4 characters to create a unique filename if a file
|
|
487
|
+
* already exists. The filename of the attachment (or related item) within the email object is
|
|
488
|
+
* updated and can be retrieved by the program to determine the actual file(s) created.
|
|
489
|
+
*
|
|
490
|
+
* This setting applies only when attachments or related items are written to the filesystem. When
|
|
491
|
+
* `false` and a name collision occurs during a save operation, Chilkat chooses a unique filename
|
|
492
|
+
* and updates the corresponding filename stored in the email object.
|
|
493
|
+
*/
|
|
494
|
+
overwriteExisting: boolean
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* When an email is sent encrypted (using PKCS#7 public-key encryption), this selects the
|
|
498
|
+
* underlying symmetric encryption algorithm. Possible values are: `aes`, `aes-gcm`, `des`,
|
|
499
|
+
* `3des`, and `rc2`. The default value is `aes`.
|
|
500
|
+
*
|
|
501
|
+
* **Note:** The `aes-gcm` option was added in Chilkat v10.0.0
|
|
502
|
+
*
|
|
503
|
+
* This setting is used when S/MIME encryption is generated, typically after {@link
|
|
504
|
+
* Email.sendEncrypted} is set to `true` and recipient encryption certificates have been supplied.
|
|
505
|
+
*/
|
|
506
|
+
pkcs7CryptAlg: string
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* When the email is sent encrypted using PKCS#7 public-key encryption, this selects the key
|
|
510
|
+
* length of the underlying symmetric encryption algorithm. The default value is `128`.
|
|
511
|
+
*
|
|
512
|
+
* The allowed values depend on {@link Email.pkcs7CryptAlg}:
|
|
513
|
+
*
|
|
514
|
+
* - For `aes`, use `128`, `192`, or `256`.
|
|
515
|
+
*
|
|
516
|
+
* - For `3des`, use `192`.
|
|
517
|
+
*
|
|
518
|
+
* - For `des`, use `40`.
|
|
519
|
+
*
|
|
520
|
+
* - For `rc2`, use `40`, `56`, `64`, or `128`.
|
|
521
|
+
*
|
|
522
|
+
* An unsupported algorithm and key-length combination causes the encryption operation to fail.
|
|
523
|
+
*/
|
|
524
|
+
pkcs7KeyLength: number
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Only applies when building an email with non-English characters where the charset is not
|
|
528
|
+
* explicitly set. The Chilkat email component will automatically choose a charset based on the
|
|
529
|
+
* languages found within an email (if the charset is not already specified within the MIME or
|
|
530
|
+
* explicitly specified by setting the {@link Email.charset} property). The default charset chosen
|
|
531
|
+
* for each language is:
|
|
532
|
+
*
|
|
533
|
+
* Chinese: `gb2312`
|
|
534
|
+
* Japanese: `shift_JIS`
|
|
535
|
+
* Korean: `ks_c_5601-1987`
|
|
536
|
+
* Thai: `windows-874`
|
|
537
|
+
* All others: `iso-8859-*`
|
|
538
|
+
*
|
|
539
|
+
* This allows for charsets such as iso-2022-jp to be chosen instead of the default. If the
|
|
540
|
+
* preferred charset does not apply to the situation, it is not used. For example, if the
|
|
541
|
+
* preferred charset is iso-2022-jp, but the email contains Greek characters, then the preferred
|
|
542
|
+
* charset is ignored.
|
|
543
|
+
*
|
|
544
|
+
* This is a preference, not a forced conversion. It is ignored when the message already specifies
|
|
545
|
+
* a charset or when the requested charset cannot represent the email text.
|
|
546
|
+
*/
|
|
547
|
+
preferredCharset: string
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* When `true`, header fields added via the {@link Email.addHeaderField} or {@link
|
|
551
|
+
* Email.addHeaderField2} methods are prepended to the top of the header as opposed to appended to
|
|
552
|
+
* the bottom. The default value is `false`.
|
|
553
|
+
*
|
|
554
|
+
* This affects header fields added after the property is set. It does not reorder fields that are
|
|
555
|
+
* already present.
|
|
556
|
+
*/
|
|
557
|
+
prependHeaders: boolean
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* `true` if this email was originally received with encryption, otherwise `false`.
|
|
561
|
+
*
|
|
562
|
+
* This records how the message was originally received. It remains useful after successful
|
|
563
|
+
* automatic decryption, when the visible body is already the decrypted content.
|
|
564
|
+
*
|
|
565
|
+
* This property is read-only.
|
|
566
|
+
*/
|
|
567
|
+
readonly receivedEncrypted: boolean
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* `true` if this email was originally received with a digital signature, otherwise `false`.
|
|
571
|
+
*
|
|
572
|
+
* This records whether the original message contained one or more digital signatures. Use {@link
|
|
573
|
+
* Email.signaturesValid} to determine whether the signed content verified successfully.
|
|
574
|
+
*
|
|
575
|
+
* This property is read-only.
|
|
576
|
+
*/
|
|
577
|
+
readonly receivedSigned: boolean
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Sets the `Reply-To` header field to the specified email address such as `john@example.com`. The
|
|
581
|
+
* `Reply-To` header automatically defaults to the {@link Email.from} email address. You would
|
|
582
|
+
* only set this property if you wish for the `Reply-To` email address to be different from the
|
|
583
|
+
* {@link Email.from} address.
|
|
584
|
+
*
|
|
585
|
+
* There is usually only a single `Reply-To` email address. If multiple `Reply-To` addresses are
|
|
586
|
+
* needed, then set with a comma-separated list of email addresses such as `john@example.com,
|
|
587
|
+
* mary@somewhere.com`.
|
|
588
|
+
*
|
|
589
|
+
* This changes the MIME `Reply-To` header only; it does not change the SMTP envelope sender or
|
|
590
|
+
* the visible `From` header.
|
|
591
|
+
*/
|
|
592
|
+
replyTo: string
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Set to `true` if you want the email to request a return-receipt when received by the recipient.
|
|
596
|
+
* The default value is `false`.
|
|
597
|
+
*
|
|
598
|
+
* Setting this property causes the `Disposition-Notification-To` email header to be added when
|
|
599
|
+
* the email is sent.
|
|
600
|
+
*
|
|
601
|
+
* A return receipt is only a request. The recipient's mail client or server may ignore it, and a
|
|
602
|
+
* receipt is not proof that the message was read by a person.
|
|
603
|
+
*/
|
|
604
|
+
returnReceipt: boolean
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Set to `true` if this email should be sent encrypted. The default value is `false`.
|
|
608
|
+
*
|
|
609
|
+
* Encryption requires one or more recipient certificates, supplied with methods such as {@link
|
|
610
|
+
* Email.addEncryptCert} or {@link Email.setEncryptCert}. Setting this property alone does not
|
|
611
|
+
* provide a certificate.
|
|
612
|
+
*/
|
|
613
|
+
sendEncrypted: boolean
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Set to `true` if this email should be sent with a digital signature. The default value is
|
|
617
|
+
* `false`.
|
|
618
|
+
*
|
|
619
|
+
* Signing requires a certificate with access to its private key, supplied with {@link
|
|
620
|
+
* Email.setSigningCert} or {@link Email.setSigningCert2}.
|
|
621
|
+
*
|
|
622
|
+
* **Note:** Please be aware of the Apple Mail bug explained in the webpage at the link below.
|
|
623
|
+
*/
|
|
624
|
+
sendSigned: boolean
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* `true` if the email was received with one or more digital signatures, and if all the signatures
|
|
628
|
+
* were validated indicating that the email was not altered. Otherwise this property is set to
|
|
629
|
+
* `false`. (This property is only meaningful when the {@link Email.receivedSigned} property is
|
|
630
|
+
* equal to `true`.)
|
|
631
|
+
*
|
|
632
|
+
* This indicates cryptographic integrity of the signed content. Applications that also require
|
|
633
|
+
* certificate trust should separately examine the signer certificate and its chain.
|
|
634
|
+
*
|
|
635
|
+
* This property is read-only.
|
|
636
|
+
*/
|
|
637
|
+
readonly signaturesValid: boolean
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* If the email was received digitally signed, this property contains the fields of the
|
|
641
|
+
* certificate's SubjectDN.
|
|
642
|
+
*
|
|
643
|
+
* For example: US, 94105, California, San Francisco, 100 Market Street, Northwind Research LLC,
|
|
644
|
+
* Engineering, Avery Morgan
|
|
645
|
+
*
|
|
646
|
+
* This is similar to a distinguished name (DN), but without the attribute names, such as `C=`,
|
|
647
|
+
* `ST=`, `L=`, `O=`, and `CN=`, preceding each value.
|
|
648
|
+
*
|
|
649
|
+
* This is intended for display or diagnostics. Use {@link Email.lastSignerCert} when the signer
|
|
650
|
+
* certificate itself is needed.
|
|
651
|
+
*
|
|
652
|
+
* This property is read-only.
|
|
653
|
+
*/
|
|
654
|
+
readonly signedBy: string
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Selects the underlying hash algorithm used when sending signed (PKCS#7) email. Possible values
|
|
658
|
+
* are `sha1`, `sha256`, `sha384`, `sha512`, `md5`, and `md2`. The default is `sha1`.
|
|
659
|
+
*
|
|
660
|
+
* This property controls the message-digest algorithm placed in the signature. It is used only
|
|
661
|
+
* when a signed message is generated.
|
|
662
|
+
*/
|
|
663
|
+
signingHashAlg: string
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* The size in bytes of the email, including all parts and attachments.
|
|
667
|
+
*
|
|
668
|
+
* **Note:** This property is only valid if the full email was downloaded. If only the header was
|
|
669
|
+
* downloaded, then this property will contain the size of just the header.
|
|
670
|
+
*
|
|
671
|
+
* This value describes the email data currently present in the object. It should not be used as
|
|
672
|
+
* the server-reported full message size when only a partial message was downloaded.
|
|
673
|
+
*
|
|
674
|
+
* This property is read-only.
|
|
675
|
+
*/
|
|
676
|
+
readonly size: number
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* The email subject.
|
|
680
|
+
*
|
|
681
|
+
* This property reads or writes the MIME `Subject` header. Chilkat performs the required MIME
|
|
682
|
+
* header encoding when the subject contains non-ASCII characters.
|
|
683
|
+
*/
|
|
684
|
+
subject: string
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Contains the unique message identifier assigned by a POP3 server. The value is also represented
|
|
688
|
+
* by the `X-UIDL` header field.
|
|
689
|
+
*
|
|
690
|
+
* **Important:** UIDLs are specific to POP3. IMAP uses UIDs instead. An email downloaded through
|
|
691
|
+
* `Chilkat.Imap` stores its IMAP identifier in the `ckx-imap-uid` header. The `ckx-imap-isUid`
|
|
692
|
+
* header contains `YES` when that value is an IMAP UID, or `NO` when it is a mailbox sequence
|
|
693
|
+
* number.
|
|
694
|
+
*
|
|
695
|
+
* A UIDL identifies a POP3 message within the server's mailbox and is normally used to avoid
|
|
696
|
+
* downloading the same message repeatedly.
|
|
697
|
+
*
|
|
698
|
+
* This property is read-only.
|
|
699
|
+
*/
|
|
700
|
+
readonly uidl: string
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Applies to the {@link Email.unpackHtml} method. When `true`, relative paths are used within the
|
|
704
|
+
* HTML for the links to the related files (images and style sheets) that were unpacked to the
|
|
705
|
+
* filesystem. Otherwise absolute paths are used. The default value is `true`.
|
|
706
|
+
*
|
|
707
|
+
* Relative paths are usually preferable when the unpacked HTML directory will be moved or
|
|
708
|
+
* deployed as a unit. Absolute paths can be useful for immediate local viewing.
|
|
709
|
+
*/
|
|
710
|
+
unpackUseRelPaths: boolean
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Returns the number of message/rfc822 parts contained within the multipart/digest enclosure. If
|
|
714
|
+
* no multipart/digest enclosure exists, then this property has the value of 0. The `GetDigest`
|
|
715
|
+
* method is called to get the Nth digest as an email object.
|
|
716
|
+
*
|
|
717
|
+
* Digest indexes are zero-based. Use {@link Email.getDigestEmail} to retrieve an individual
|
|
718
|
+
* message from the digest.
|
|
719
|
+
*
|
|
720
|
+
* This property is read-only.
|
|
721
|
+
*/
|
|
722
|
+
readonly numDigests: number
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Selects the signature algorithm to be used when sending signed (PKCS#7) email. The default
|
|
726
|
+
* value is `PKCS1-v1_5`. This can be set to `RSASSA-PSS` (or simply `pss`) to use the RSASSA-PSS
|
|
727
|
+
* signature scheme.
|
|
728
|
+
*
|
|
729
|
+
* **Note:** This property only applies when signing with an RSA private key. It does not apply
|
|
730
|
+
* for ECC or DSA private keys.
|
|
731
|
+
*
|
|
732
|
+
* This setting is used only for RSA signing. The selected scheme must also be supported by the
|
|
733
|
+
* private key provider.
|
|
734
|
+
*/
|
|
735
|
+
signingAlg: string
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Selects the RSA encryption scheme when encrypting email. The default value is `false`, which
|
|
739
|
+
* selects RSAES_PKCS1-V1_5. When set to `true`, RSAES_OAEP is used.
|
|
740
|
+
*
|
|
741
|
+
* This affects the RSA key-encryption step used for S/MIME encryption; it does not change the
|
|
742
|
+
* symmetric content-encryption algorithm selected by {@link Email.pkcs7CryptAlg}.
|
|
743
|
+
*/
|
|
744
|
+
oaepPadding: boolean
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Selects the hash algorithm used by OAEP padding when encrypting email with RSAES-OAEP. Valid
|
|
748
|
+
* values are `sha1`, `sha256`, `sha384`, and `sha512`. The default is `sha256`.
|
|
749
|
+
*
|
|
750
|
+
* This property is used only when {@link Email.oaepPadding} is `true`.
|
|
751
|
+
*/
|
|
752
|
+
oaepHash: string
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Selects the mask-generation function (MGF) hash algorithm used by OAEP padding when encrypting
|
|
756
|
+
* email with RSAES-OAEP. Valid values are `sha1`, `sha256`, `sha384`, and `sha512`. The default
|
|
757
|
+
* is `sha256`.
|
|
758
|
+
*
|
|
759
|
+
* This property is used only when {@link Email.oaepPadding} is `true`. Some recipients require
|
|
760
|
+
* the MGF hash to match {@link Email.oaepHash}.
|
|
761
|
+
*/
|
|
762
|
+
oaepMgfHash: string
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* This is a catch-all property to be used for uncommon needs. This property defaults to the empty
|
|
766
|
+
* string, and should typically remain empty.
|
|
767
|
+
*
|
|
768
|
+
* - `NoBccHeader` - (added in v11.0.0) Do not add the `Bcc` MIME header for BCC email addresses.
|
|
769
|
+
* Note: The `NoBccHeader` keyword must be present before calling {@link Email.addBcc} or {@link
|
|
770
|
+
* Email.addMultipleBcc}
|
|
771
|
+
*
|
|
772
|
+
* - `NO_FORMAT_FLOWED` - Don't automatically add `format=flowed` to any `Content-Type` header.
|
|
773
|
+
*
|
|
774
|
+
* Leave this property empty unless a documented compatibility option is specifically required.
|
|
775
|
+
* Unrecognized keywords should not be assumed to have any effect.
|
|
776
|
+
*/
|
|
777
|
+
uncommonOptions: string
|
|
778
|
+
|
|
779
|
+
// ---- Methods ----
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Adds or replaces a MIME header field in one of the email attachments. If the header field does
|
|
783
|
+
* not exist, it is added. Otherwise it is replaced.
|
|
784
|
+
*
|
|
785
|
+
* **Indexing:** `index` is zero-based and must identify an existing attachment. This changes the
|
|
786
|
+
* attachment MIME header in the current email object; it does not modify the original source
|
|
787
|
+
* file.
|
|
788
|
+
*/
|
|
789
|
+
addAttachmentHeader(index: number, fieldName: string, fieldValue: string): void
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Adds a recipient to the blind carbon-copy (BCC) list. `emailAddress` is required;
|
|
793
|
+
* `friendlyName` is optional. Call this method separately for each BCC recipient.
|
|
794
|
+
*
|
|
795
|
+
* **Note:** Before v11.0.0, BCC addresses are not added to the MIME header. After v11.0.0, BCC
|
|
796
|
+
* addresses are included in the MIME header. Most email servers remove the `BCC` header before
|
|
797
|
+
* delivering the message to regular recipients. The `NoBccHeader` keyword can be used in {@link
|
|
798
|
+
* Email.uncommonOptions} to prevent BCC email addresses in the MIME passed to the SMTP server. If
|
|
799
|
+
* your application specifies `NoBccHeader`, do so before adding BCC addresses.
|
|
800
|
+
*
|
|
801
|
+
* The recipient is added to the in-memory message only. The message is not transmitted until it
|
|
802
|
+
* is passed to a sending method of `MailMan`.
|
|
803
|
+
*
|
|
804
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
805
|
+
* {@link Email.lastErrorText}.
|
|
806
|
+
*/
|
|
807
|
+
addBcc(friendlyName: string, emailAddress: string): void
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Adds a recipient to the carbon-copy list. `emailAddress` is required, but `friendlyName` may be
|
|
811
|
+
* empty.
|
|
812
|
+
*
|
|
813
|
+
* To add multiple CC recipients, call this method once per recipient.
|
|
814
|
+
*
|
|
815
|
+
* The recipient is added to the in-memory message only. Use {@link Email.numCC} and the Cc getter
|
|
816
|
+
* methods to inspect the resulting list.
|
|
817
|
+
*
|
|
818
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
819
|
+
* {@link Email.lastErrorText}.
|
|
820
|
+
*/
|
|
821
|
+
addCC(friendlyName: string, emailAddress: string): void
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Allows for certificates to be explicitly specified for sending encrypted email to one or more
|
|
825
|
+
* recipients. Call this method once per certificate to be used. The {@link
|
|
826
|
+
* Email.clearEncryptCerts} method may be called to clear the list of explicitly-specified
|
|
827
|
+
* certificates.
|
|
828
|
+
*
|
|
829
|
+
* **Note:** It is possible to send encrypted email without explicitly specifying the
|
|
830
|
+
* certificates. On Windows, the registry-based Current-User and Local-Machine certificate stores
|
|
831
|
+
* are automatically searched for certificates matching each recipient in the To, CC, and BCC
|
|
832
|
+
* lists. On macOS, the Keychain is automatically searched for matching recipient certificates.
|
|
833
|
+
*
|
|
834
|
+
* **Note:** The {@link Email.setEncryptCert} method is equivalent to calling {@link
|
|
835
|
+
* Email.clearEncryptCerts} followed by AddEncryptCert.
|
|
836
|
+
*
|
|
837
|
+
* Use this method when encrypting for multiple recipients: add each recipient certificate
|
|
838
|
+
* separately. For a single explicitly selected certificate, {@link Email.setEncryptCert} may be
|
|
839
|
+
* simpler.
|
|
840
|
+
*
|
|
841
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
842
|
+
* {@link Email.lastErrorText}.
|
|
843
|
+
*/
|
|
844
|
+
addEncryptCert(cert: Cert): void
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Adds a file as an attachment to the email. Returns the MIME `Content-Type` of the attachment,
|
|
848
|
+
* which is inferred based on the filename extension.
|
|
849
|
+
*
|
|
850
|
+
* `path` is a local filesystem path. The file is read and incorporated into the current email
|
|
851
|
+
* object, and the attachment filename placed in MIME is derived from `path`.
|
|
852
|
+
*
|
|
853
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
854
|
+
* {@link Email.lastErrorText}.
|
|
855
|
+
*/
|
|
856
|
+
addFileAttachment(path: string): string
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* Same as {@link Email.addFileAttachment}, but the content type can be explicitly specified.
|
|
860
|
+
*
|
|
861
|
+
* Use this form when filename-based MIME type inference is unsuitable. `contentType` should be a
|
|
862
|
+
* MIME media type such as `application/octet-stream`.
|
|
863
|
+
*
|
|
864
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
865
|
+
* {@link Email.lastErrorText}.
|
|
866
|
+
*/
|
|
867
|
+
addFileAttachment2(path: string, contentType: string): void
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Any standard or non-standard (custom) header field can be added to the email with this method.
|
|
871
|
+
* One interesting feature is that all header fields whose name begins with `CKX-` will not be
|
|
872
|
+
* included in the header when an email is sent. These fields will be included when saved to or
|
|
873
|
+
* loaded from XML. This makes it easy to include persistent meta-data with an email which your
|
|
874
|
+
* programs can use in any way it chooses.
|
|
875
|
+
*
|
|
876
|
+
* **Important:** This method will replace an already-existing header field. To allow for adding
|
|
877
|
+
* duplicate header fields, call {@link Email.addHeaderField2} (see below).
|
|
878
|
+
*
|
|
879
|
+
* This changes the MIME header stored in the current email object. It does not change the SMTP
|
|
880
|
+
* envelope, except where another component explicitly interprets a particular header.
|
|
881
|
+
*/
|
|
882
|
+
addHeaderField(fieldName: string, fieldValue: string): void
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* This method is the same as {@link Email.addHeaderField}, except that if the header field
|
|
886
|
+
* already exists, it is not replaced. A duplicate header will be added.
|
|
887
|
+
*
|
|
888
|
+
* Use this method for headers that may legally occur more than once, such as `Received`. For a
|
|
889
|
+
* single-valued field that should be replaced, use {@link Email.addHeaderField}.
|
|
890
|
+
*/
|
|
891
|
+
addHeaderField2(fieldName: string, fieldValue: string): void
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Adds or replaces the HTML body representation of the email.
|
|
895
|
+
*
|
|
896
|
+
* If no HTML alternative exists, one is added. If an HTML alternative already exists, it is
|
|
897
|
+
* replaced rather than duplicated. Repeated calls therefore leave at most one HTML alternative.
|
|
898
|
+
*
|
|
899
|
+
* When paired with {@link Email.addPlainTextAlternativeBody}, Chilkat creates a
|
|
900
|
+
* `multipart/alternative` body so mail clients can choose the representation they support. Use
|
|
901
|
+
* {@link Email.setHtmlBody} when a multipart alternative is not needed.
|
|
902
|
+
*
|
|
903
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
904
|
+
* {@link Email.lastErrorText}.
|
|
905
|
+
*/
|
|
906
|
+
addHtmlAlternativeBody(body: string): void
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Parses the mailbox list in `commaSeparatedAddresses` and appends the results to the blind
|
|
910
|
+
* carbon-copy (Bcc) recipient list.
|
|
911
|
+
*
|
|
912
|
+
* Recipients may be separated by commas or semicolons. Each item may be a bare address or a
|
|
913
|
+
* mailbox with a display name. Quoted display names may contain commas.
|
|
914
|
+
*
|
|
915
|
+
* Empty items are ignored. Duplicate addresses are retained.
|
|
916
|
+
*
|
|
917
|
+
* **Note:** Before v11.0.0, BCC addresses were not added to the MIME header. Starting in v11.0.0,
|
|
918
|
+
* BCC addresses are included in the MIME header. Most email servers remove the `Bcc` header
|
|
919
|
+
* before delivering the message to regular recipients. To omit BCC addresses from generated MIME,
|
|
920
|
+
* place the `NoBccHeader` keyword in {@link Email.uncommonOptions} before adding BCC recipients.
|
|
921
|
+
*
|
|
922
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
923
|
+
* {@link Email.lastErrorText}.
|
|
924
|
+
*/
|
|
925
|
+
addMultipleBcc(commaSeparatedAddresses: string): void
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Parses the mailbox list in `commaSeparatedAddresses` and appends the results to the carbon-copy
|
|
929
|
+
* (Cc) recipient list.
|
|
930
|
+
*
|
|
931
|
+
* Recipients may be separated by commas or semicolons. Each item may be a bare address or a
|
|
932
|
+
* mailbox with a display name. Quoted display names may contain commas.
|
|
933
|
+
*
|
|
934
|
+
* Empty items are ignored. Duplicate addresses are retained.
|
|
935
|
+
*
|
|
936
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
937
|
+
* {@link Email.lastErrorText}.
|
|
938
|
+
*/
|
|
939
|
+
addMultipleCC(commaSeparatedAddresses: string): void
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Parses the mailbox list in `commaSeparatedAddresses` and appends the results to the
|
|
943
|
+
* direct-recipient (To) list.
|
|
944
|
+
*
|
|
945
|
+
* Recipients may be separated by commas or semicolons. Each item may be a bare address or a
|
|
946
|
+
* mailbox with a display name. Quoted display names may contain commas.
|
|
947
|
+
*
|
|
948
|
+
* Empty items are ignored. Duplicate addresses are retained.
|
|
949
|
+
*
|
|
950
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
951
|
+
* {@link Email.lastErrorText}.
|
|
952
|
+
*/
|
|
953
|
+
addMultipleTo(commaSeparatedAddresses: string): void
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Adds the PFX file specified by `pfxFilePath` to the internal list of certificate and
|
|
957
|
+
* private-key sources used during decryption. `pfxPassword` contains the PFX password.
|
|
958
|
+
*
|
|
959
|
+
* Call this method once for each additional PFX file. On Windows, Chilkat automatically searches
|
|
960
|
+
* the system certificate stores. On macOS, Chilkat automatically searches the Keychain.
|
|
961
|
+
* Therefore, explicitly adding a PFX source is often unnecessary when the required certificate
|
|
962
|
+
* and private key are already installed.
|
|
963
|
+
*
|
|
964
|
+
* The PFX file becomes a certificate source for later operations performed by this email object.
|
|
965
|
+
* The file must be readable when this method is called.
|
|
966
|
+
*
|
|
967
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
968
|
+
* {@link Email.lastErrorText}.
|
|
969
|
+
*/
|
|
970
|
+
addPfxSourceFile(pfxFilePath: string, pfxPassword: string): void
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Adds or replaces the plain-text body representation of the email.
|
|
974
|
+
*
|
|
975
|
+
* If no plain-text alternative exists, one is added. If a plain-text alternative already exists,
|
|
976
|
+
* it is replaced rather than duplicated. Repeated calls therefore leave at most one plain-text
|
|
977
|
+
* alternative.
|
|
978
|
+
*
|
|
979
|
+
* When paired with {@link Email.addHtmlAlternativeBody}, Chilkat creates a
|
|
980
|
+
* `multipart/alternative` body so text-only clients have a suitable representation. Use {@link
|
|
981
|
+
* Email.setTextBody} when a multipart alternative is not needed.
|
|
982
|
+
*
|
|
983
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
984
|
+
* {@link Email.lastErrorText}.
|
|
985
|
+
*/
|
|
986
|
+
addPlainTextAlternativeBody(body: string): void
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Adds the contents of the local file in `path` as a related MIME resource and returns the
|
|
990
|
+
* generated `Content-ID`.
|
|
991
|
+
*
|
|
992
|
+
* The returned value is the bare `Content-ID`. It does not include angle brackets or the `cid:`
|
|
993
|
+
* prefix. For example, if the method returns `CID-123@example`, the HTML reference is
|
|
994
|
+
* `cid:CID-123@example`.
|
|
995
|
+
*
|
|
996
|
+
* This method does not modify the HTML body. The application must add or update the corresponding
|
|
997
|
+
* `cid:` reference itself.
|
|
998
|
+
*
|
|
999
|
+
* The file becomes a related MIME resource rather than an ordinary attachment.
|
|
1000
|
+
*
|
|
1001
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1002
|
+
* {@link Email.lastErrorText}.
|
|
1003
|
+
*/
|
|
1004
|
+
addRelatedFile(path: string): string
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Adds the local file in `filenameOnDisk` as a related MIME resource addressed by
|
|
1008
|
+
* `Content-Location` rather than `Content-ID`.
|
|
1009
|
+
*
|
|
1010
|
+
* `filenameInHtml` becomes the related item's MIME filename and `Content-Location` value. It
|
|
1011
|
+
* should match the filename, path, or URL already used by the corresponding HTML reference, such
|
|
1012
|
+
* as an `img` element's `src` attribute.
|
|
1013
|
+
*
|
|
1014
|
+
* This method does not generate a `Content-ID` and does not modify the HTML body. The HTML must
|
|
1015
|
+
* already refer to `filenameInHtml`.
|
|
1016
|
+
*
|
|
1017
|
+
* **Note:** Outlook.com may fail to display embedded images when `filenameInHtml` contains a
|
|
1018
|
+
* path. For best compatibility, use only a filename when targeting Outlook.com.
|
|
1019
|
+
*
|
|
1020
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1021
|
+
* {@link Email.lastErrorText}.
|
|
1022
|
+
*/
|
|
1023
|
+
addRelatedFile2(filenameOnDisk: string, filenameInHtml: string): void
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Adds or replaces a MIME header field in one of the email's related items. If the header field
|
|
1027
|
+
* does not exist, it is added. Otherwise it is replaced.
|
|
1028
|
+
*
|
|
1029
|
+
* **Indexing:** `index` is zero-based and must identify an existing related item. The change
|
|
1030
|
+
* applies to the related item's MIME sub-header.
|
|
1031
|
+
*/
|
|
1032
|
+
addRelatedHeader(index: number, fieldName: string, fieldValue: string): void
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* Adds a text-based related MIME resource, such as a style sheet, and returns the generated
|
|
1036
|
+
* `Content-ID`.
|
|
1037
|
+
*
|
|
1038
|
+
* `nameInHtml` is the MIME filename or resource name, `str` contains the text content, and
|
|
1039
|
+
* `charset` specifies the charset used to encode that content.
|
|
1040
|
+
*
|
|
1041
|
+
* The returned value is the bare `Content-ID`. It does not include angle brackets or the `cid:`
|
|
1042
|
+
* prefix. This method does not modify the HTML body; the application must add or update the
|
|
1043
|
+
* corresponding `cid:` reference itself.
|
|
1044
|
+
*
|
|
1045
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1046
|
+
* {@link Email.lastErrorText}.
|
|
1047
|
+
*/
|
|
1048
|
+
addRelatedString(nameInHtml: string, str: string, charset: string): string
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Adds a related item to the email from an in-memory string. Related items are things such as
|
|
1052
|
+
* images and style sheets that are embedded within an HTML email. They are not considered
|
|
1053
|
+
* attachments because their sole purpose is to participate in the display of the HTML.
|
|
1054
|
+
*
|
|
1055
|
+
* `fileNameInHtml` should be set to the filename used in an HTML `img` tag's `src` attribute, or
|
|
1056
|
+
* to the URL referenced by an HTML `link` tag for a style sheet. `content` contains the Unicode
|
|
1057
|
+
* text to add. `charset` specifies the charset to which `content` is converted before the MIME
|
|
1058
|
+
* part is created, such as `iso-8859-1`, `utf-8`, or `Shift_JIS`.
|
|
1059
|
+
*
|
|
1060
|
+
* The resource is added as related content, not as a normal file attachment.
|
|
1061
|
+
*/
|
|
1062
|
+
addRelatedString2(fileNameInHtml: string, content: string, charset: string): void
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Adds an attachment directly from a string in memory to the email.
|
|
1066
|
+
*
|
|
1067
|
+
* `path` supplies the filename placed in MIME, not a file to be read. `content` is the text
|
|
1068
|
+
* content that becomes the attachment body.
|
|
1069
|
+
*
|
|
1070
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1071
|
+
* {@link Email.lastErrorText}.
|
|
1072
|
+
*/
|
|
1073
|
+
addStringAttachment(path: string, content: string): void
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
* Adds a text attachment using the in-memory string in `content`.
|
|
1077
|
+
*
|
|
1078
|
+
* `path` specifies the attachment filename; it is not a path to an existing local file. `charset`
|
|
1079
|
+
* specifies the charset used to encode the string before it is added to the email.
|
|
1080
|
+
*
|
|
1081
|
+
* **Note:** `charset` may begin with `bom-` or `no-bom-` to require or suppress a byte-order mark
|
|
1082
|
+
* for encodings such as UTF-8 or UTF-16. Examples include `bom-utf-8` and `no-bom-utf-8`.
|
|
1083
|
+
*
|
|
1084
|
+
* This method is appropriate for text data already held in memory. For arbitrary binary bytes,
|
|
1085
|
+
* use a `BinData`- or byte-based attachment method instead.
|
|
1086
|
+
*
|
|
1087
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1088
|
+
* {@link Email.lastErrorText}.
|
|
1089
|
+
*/
|
|
1090
|
+
addStringAttachment2(path: string, content: string, charset: string): void
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Adds a recipient to the `to` list. `emailAddress` is required, but `friendlyName` may be empty.
|
|
1094
|
+
* Emails that have no `To` recipients will be sent to _LT_undisclosed-recipients_GT_.
|
|
1095
|
+
*
|
|
1096
|
+
* To add multiple recipients, call this method once per TO recipient.
|
|
1097
|
+
*
|
|
1098
|
+
* The recipient is added to the current in-memory message. Use {@link Email.numTo} and the To
|
|
1099
|
+
* getter methods to inspect the resulting list.
|
|
1100
|
+
*
|
|
1101
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1102
|
+
* {@link Email.lastErrorText}.
|
|
1103
|
+
*/
|
|
1104
|
+
addTo(friendlyName: string, emailAddress: string): void
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Adds or replaces an iCalendar body as a `text/calendar` alternative.
|
|
1108
|
+
*
|
|
1109
|
+
* If an iCalendar alternative already exists, it is replaced rather than duplicated. Repeated
|
|
1110
|
+
* calls therefore leave at most one calendar alternative.
|
|
1111
|
+
*
|
|
1112
|
+
* `icalContent` contains the iCalendar data. `methodName` specifies the `method` parameter placed
|
|
1113
|
+
* in the alternative body's `Content-Type` header, such as `REQUEST` or `CANCEL`.
|
|
1114
|
+
*
|
|
1115
|
+
* ```
|
|
1116
|
+
* BEGIN:VCALENDAR
|
|
1117
|
+
* VERSION:2.0
|
|
1118
|
+
* PRODID:-//hacksw/handcal//NONSGML v1.0//EN
|
|
1119
|
+
* BEGIN:VEVENT
|
|
1120
|
+
* UID:uid1@example.com
|
|
1121
|
+
* DTSTAMP:19970714T170000Z
|
|
1122
|
+
* ORGANIZER;CN=John Doe:MAILTO:john.doe@example.com
|
|
1123
|
+
* DTSTART:19970714T170000Z
|
|
1124
|
+
* DTEND:19970715T035959Z
|
|
1125
|
+
* SUMMARY:Bastille Day Party
|
|
1126
|
+
* END:VEVENT
|
|
1127
|
+
* END:VCALENDAR
|
|
1128
|
+
* ```
|
|
1129
|
+
*
|
|
1130
|
+
* For example, when `methodName` is `REQUEST`, the MIME headers for the alternative body include:
|
|
1131
|
+
*
|
|
1132
|
+
* ```
|
|
1133
|
+
* Content-Type: text/calendar; method=REQUEST
|
|
1134
|
+
* Content-Transfer-Encoding: base64
|
|
1135
|
+
* ```
|
|
1136
|
+
*
|
|
1137
|
+
* Calendar-aware mail clients may display this part as a meeting invitation, cancellation, or
|
|
1138
|
+
* published event according to the iCalendar `METHOD` value and the contents of `icalContent`.
|
|
1139
|
+
*
|
|
1140
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1141
|
+
* {@link Email.lastErrorText}.
|
|
1142
|
+
*/
|
|
1143
|
+
addiCalendarAlternativeBody(icalContent: string, methodName: string): void
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Decrypts and restores an email message that was previously encrypted using {@link
|
|
1147
|
+
* Email.aesEncrypt}. `password` must be the same password that was passed as `password` to {@link
|
|
1148
|
+
* Email.aesEncrypt}.
|
|
1149
|
+
*
|
|
1150
|
+
* This is Chilkat's password-based email-object encryption counterpart to {@link
|
|
1151
|
+
* Email.aesEncrypt}; it is not S/MIME certificate-based decryption.
|
|
1152
|
+
*
|
|
1153
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1154
|
+
* {@link Email.lastErrorText}.
|
|
1155
|
+
*/
|
|
1156
|
+
aesDecrypt(password: string): void
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* Encrypts the email body, all alternative bodies, all message sub-parts, and attachments using
|
|
1160
|
+
* 128-bit AES CBC encryption. To decrypt the email, call {@link Email.aesDecrypt} and pass the
|
|
1161
|
+
* same value for `password`.
|
|
1162
|
+
*
|
|
1163
|
+
* The `AesEncrypt`/{@link Email.aesDecrypt} methods use symmetric password-based AES encryption
|
|
1164
|
+
* and do not use certificates or private keys. The sending and receiving applications must both
|
|
1165
|
+
* use Chilkat, and the value of `password` must be known by both applications.
|
|
1166
|
+
*
|
|
1167
|
+
* This is separate from S/MIME encryption controlled by {@link Email.sendEncrypted}.
|
|
1168
|
+
*
|
|
1169
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1170
|
+
* {@link Email.lastErrorText}.
|
|
1171
|
+
*/
|
|
1172
|
+
aesEncrypt(password: string): void
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Appends a string to the plain-text body.
|
|
1176
|
+
*
|
|
1177
|
+
* If the message has only an HTML body, this method does not append HTML. Use {@link
|
|
1178
|
+
* Email.setHtmlBody} or retrieve and reset the HTML body when HTML content must be extended.
|
|
1179
|
+
*/
|
|
1180
|
+
appendToBody(str: string): void
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Unpacks an HTML email's body and its related items (images, style sheets, and the like) to the
|
|
1184
|
+
* filesystem: each related part is written as a separate file, and the HTML is rewritten so those
|
|
1185
|
+
* parts load as ordinary files instead of `cid:` references.
|
|
1186
|
+
*
|
|
1187
|
+
* **Despite the "Asp" in the name** (a historical artifact), this method is not limited to
|
|
1188
|
+
* classic ASP. It is useful whenever an HTML email must be displayed or processed outside of a
|
|
1189
|
+
* mail client, including:
|
|
1190
|
+
*
|
|
1191
|
+
* - **Web display** — rendering a message in webmail or any web application (PHP, ASP.NET, Node,
|
|
1192
|
+
* Java, Python, and so on), where the browser loads the saved images and style sheets from a
|
|
1193
|
+
* URL.
|
|
1194
|
+
*
|
|
1195
|
+
* - **Archiving** — saving an email as a self-contained, browsable HTML folder for long-term
|
|
1196
|
+
* storage or compliance, viewable later without the original mail client.
|
|
1197
|
+
*
|
|
1198
|
+
* - **Embedded viewers** — loading the unpacked HTML into a desktop application's built-in
|
|
1199
|
+
* browser or WebView control, which renders local files.
|
|
1200
|
+
*
|
|
1201
|
+
* - **Format conversion** — feeding the HTML to an HTML-to-PDF (or image) renderer that needs the
|
|
1202
|
+
* related files present on disk.
|
|
1203
|
+
*
|
|
1204
|
+
* The arguments control the output: `prefix` is prepended to each saved filename, `saveDir` is
|
|
1205
|
+
* the filesystem directory where files are written, `urlPath` is the URL base substituted into
|
|
1206
|
+
* the rewritten HTML, and `cleanFiles` removes previously unpacked files first when set to
|
|
1207
|
+
* **true**.
|
|
1208
|
+
*
|
|
1209
|
+
* For purely local viewing using relative paths rather than a web `urlPath`, see `UnpackHtml`. To
|
|
1210
|
+
* instead produce a single self-contained MHT file that a WebBrowser control can display, see
|
|
1211
|
+
* `CreateTempMht`.
|
|
1212
|
+
*
|
|
1213
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1214
|
+
* {@link Email.lastErrorText}.
|
|
1215
|
+
*/
|
|
1216
|
+
aspUnpack(prefix: string, saveDir: string, urlPath: string, cleanFiles: boolean): void
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* Converts the Unicode string in `str` to the charset specified by `charset`, B-encodes the
|
|
1220
|
+
* resulting multibyte data, and returns the encoded string.
|
|
1221
|
+
*
|
|
1222
|
+
* B-encoding is commonly used in RFC 2047 encoded words for non-ASCII MIME header text. `charset`
|
|
1223
|
+
* controls the byte charset used before Base64 encoding.
|
|
1224
|
+
*
|
|
1225
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1226
|
+
* {@link Email.lastErrorText}.
|
|
1227
|
+
*/
|
|
1228
|
+
bEncodeString(str: string, charset: string): string
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Clears the list of blind carbon-copy recipients.
|
|
1232
|
+
*
|
|
1233
|
+
* This changes only the current email object and does not affect messages already sent.
|
|
1234
|
+
*/
|
|
1235
|
+
clearBcc(): void
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
* Clears the list of carbon-copy recipients.
|
|
1239
|
+
*
|
|
1240
|
+
* This changes only the current email object and does not affect messages already sent.
|
|
1241
|
+
*/
|
|
1242
|
+
clearCC(): void
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Clears the internal list of explicitly specified certificates to be used for this encrypted
|
|
1246
|
+
* email.
|
|
1247
|
+
*
|
|
1248
|
+
* This removes certificates added explicitly for future encryption operations. It does not remove
|
|
1249
|
+
* certificates from the Windows certificate stores, the macOS Keychain, or any PFX source.
|
|
1250
|
+
*/
|
|
1251
|
+
clearEncryptCerts(): void
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* Clears the list of `to` recipients.
|
|
1255
|
+
*
|
|
1256
|
+
* This changes only the current email object and does not affect messages already sent.
|
|
1257
|
+
*/
|
|
1258
|
+
clearTo(): void
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Prepares the email for display in a web browser and saves it as a temporary MHT (MIME HTML)
|
|
1262
|
+
* file, returning the path to the file. If `inFilename` is empty, a temporary filename is
|
|
1263
|
+
* generated automatically.
|
|
1264
|
+
*
|
|
1265
|
+
* To make the message viewable as a standalone web page, this method transforms the email as
|
|
1266
|
+
* follows:
|
|
1267
|
+
*
|
|
1268
|
+
* - **All attachments are dropped.**
|
|
1269
|
+
*
|
|
1270
|
+
* - If the email has **both HTML and plain-text alternatives**, the plain-text alternative is
|
|
1271
|
+
* dropped.
|
|
1272
|
+
*
|
|
1273
|
+
* - If the email has **only a plain-text body**, that body is converted to HTML.
|
|
1274
|
+
*
|
|
1275
|
+
* The resulting MHT file can be loaded by a WebBrowser control (or any viewer that understands
|
|
1276
|
+
* MHT) to render the message, inline images and all. To instead unpack the HTML and its related
|
|
1277
|
+
* files to loose files served by a web application, see `AspUnpack`.
|
|
1278
|
+
*
|
|
1279
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1280
|
+
* {@link Email.lastErrorText}.
|
|
1281
|
+
*/
|
|
1282
|
+
createTempMht(inFilename: string): string
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Removes all attachments from the email.
|
|
1286
|
+
*
|
|
1287
|
+
* This removes ordinary file attachments from the in-memory message. Related items and attached
|
|
1288
|
+
* `message/rfc822` emails are separate and are not described by this method.
|
|
1289
|
+
*/
|
|
1290
|
+
dropAttachments(): void
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* A related item is typically an embedded image referenced from the HTML in the email via a `CID`
|
|
1294
|
+
* hyperlink. This method removes the Nth embedded image from the email. Note: If the HTML tries
|
|
1295
|
+
* to reference the removed image, it will be displayed as a broken image link.
|
|
1296
|
+
*
|
|
1297
|
+
* This changes only the current in-memory `Email` object and does not delete or alter a message
|
|
1298
|
+
* on a mail server.
|
|
1299
|
+
*/
|
|
1300
|
+
dropRelatedItem(index: number): void
|
|
1301
|
+
|
|
1302
|
+
/**
|
|
1303
|
+
* A related item is typically an embedded image referenced from the HTML in the email via a `CID`
|
|
1304
|
+
* hyperlink. This method removes all the embedded images from the email.
|
|
1305
|
+
*
|
|
1306
|
+
* This removes related MIME resources from the in-memory message. It does not remove ordinary
|
|
1307
|
+
* attachments.
|
|
1308
|
+
*/
|
|
1309
|
+
dropRelatedItems(): void
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* Removes the attachment at the zero-based index specified by `index`.
|
|
1313
|
+
*
|
|
1314
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1315
|
+
*
|
|
1316
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1317
|
+
* {@link Email.lastErrorText}.
|
|
1318
|
+
*/
|
|
1319
|
+
dropSingleAttachment(index: number): void
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* Generates a unique filename for this email. The filename will be different each time the method
|
|
1323
|
+
* is called.
|
|
1324
|
+
*
|
|
1325
|
+
* This method returns a filename only; it does not create a file. It is useful when saving many
|
|
1326
|
+
* messages and a collision-resistant local name is needed.
|
|
1327
|
+
*
|
|
1328
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1329
|
+
* {@link Email.lastErrorText}.
|
|
1330
|
+
*/
|
|
1331
|
+
generateFilename(): string
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* Returns the value of a header field within the Nth alternative body's MIME sub-part.
|
|
1335
|
+
*
|
|
1336
|
+
* `index` is zero-based and refers to an alternative counted by {@link Email.numAlternatives}.
|
|
1337
|
+
* `fieldName` names the MIME header field within that alternative part.
|
|
1338
|
+
*
|
|
1339
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1340
|
+
* {@link Email.lastErrorText}.
|
|
1341
|
+
*/
|
|
1342
|
+
getAltHeaderField(index: number, fieldName: string): string
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* Returns the Nth alternative body. The {@link Email.numAlternatives} property tells the number
|
|
1346
|
+
* of alternative bodies present. Use the {@link Email.getHtmlBody} and {@link
|
|
1347
|
+
* Email.getPlainTextBody} methods to easily get the HTML or plain text alternative bodies.
|
|
1348
|
+
*
|
|
1349
|
+
* `index` is zero-based; valid values are from `0` through `3 - 1`.
|
|
1350
|
+
*
|
|
1351
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1352
|
+
* {@link Email.lastErrorText}.
|
|
1353
|
+
*/
|
|
1354
|
+
getAlternativeBody(index: number): string
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Returns the alternative body by `Content-Type`, such as `text/plain`, `text/html`, `text/xml`,
|
|
1358
|
+
* etc.
|
|
1359
|
+
*
|
|
1360
|
+
* The lookup is useful when the alternative order is not known. Typical values for `contentType`
|
|
1361
|
+
* are `text/plain` and `text/html`.
|
|
1362
|
+
*
|
|
1363
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1364
|
+
* {@link Email.lastErrorText}.
|
|
1365
|
+
*/
|
|
1366
|
+
getAlternativeBodyByContentType(contentType: string): string
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* Returns the content type of the Nth alternative body. The {@link Email.numAlternatives}
|
|
1370
|
+
* property tells the number of alternative bodies present.
|
|
1371
|
+
*
|
|
1372
|
+
* `index` is zero-based; valid values are from `0` through `1 - 1`.
|
|
1373
|
+
*
|
|
1374
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1375
|
+
* {@link Email.lastErrorText}.
|
|
1376
|
+
*/
|
|
1377
|
+
getAlternativeContentType(index: number): string
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Returns a header field attribute value for the Nth attached (embedded) email. For example, to
|
|
1381
|
+
* get the value of the `name` attribute in the `Content-Type` header for the first attached
|
|
1382
|
+
* message:
|
|
1383
|
+
*
|
|
1384
|
+
* ```
|
|
1385
|
+
* Content-Type: message/rfc822; name="md75000024149.eml"
|
|
1386
|
+
* ```
|
|
1387
|
+
*
|
|
1388
|
+
* then the method arguments should contain the values 0, `Content-Type`, `name`.
|
|
1389
|
+
*
|
|
1390
|
+
* `index` is a zero-based attached-message index. `fieldName` names a MIME header field and
|
|
1391
|
+
* `attrName` names one of that field's parameters.
|
|
1392
|
+
*
|
|
1393
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1394
|
+
* {@link Email.lastErrorText}.
|
|
1395
|
+
*/
|
|
1396
|
+
getAttachedMessageAttr(index: number, fieldName: string, attrName: string): string
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* Returns the filename of the Nth attached (embedded) email. The filename is the `filename`
|
|
1400
|
+
* attribute of the `Content-Disposition` header field found within the Nth message/rfc822
|
|
1401
|
+
* sub-part of the calling email object.
|
|
1402
|
+
*
|
|
1403
|
+
* **Important:** The attached message filename is only present if the **`Content-Disposition`**
|
|
1404
|
+
* header exists AND contains a `filename` attribute. If questions arise, one could open the email
|
|
1405
|
+
* in a text editor to examine the MIME sub-header for the attached message (where the
|
|
1406
|
+
* `Content-Type` = `message/rfc822`). For example, here is a sub-header that has a filename:
|
|
1407
|
+
*
|
|
1408
|
+
* ```
|
|
1409
|
+
* Content-Type: message/rfc822; name="GetAttachedMessageAttr.eml"
|
|
1410
|
+
* Content-Transfer-Encoding: 7bit
|
|
1411
|
+
* Content-Disposition: attachment; filename="GetAttachedMessageAttr.eml"
|
|
1412
|
+
* ```
|
|
1413
|
+
*
|
|
1414
|
+
* Here is an attached message sub-header that does NOT have a filename:
|
|
1415
|
+
*
|
|
1416
|
+
* ```
|
|
1417
|
+
* Content-Type: message/rfc822
|
|
1418
|
+
* Content-Transfer-Encoding: 7bit
|
|
1419
|
+
* Content-Disposition: attachment
|
|
1420
|
+
* ```
|
|
1421
|
+
*
|
|
1422
|
+
* `index` is zero-based. The returned value comes from MIME metadata and should be sanitized
|
|
1423
|
+
* before it is used as a local filesystem name.
|
|
1424
|
+
*
|
|
1425
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1426
|
+
* {@link Email.lastErrorText}.
|
|
1427
|
+
*/
|
|
1428
|
+
getAttachedMessageFilename(index: number): string
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* Returns a header field attribute value from the header field of the Nth attachment.
|
|
1432
|
+
*
|
|
1433
|
+
* `index` is a zero-based attachment index. `fieldName` names a header field such as
|
|
1434
|
+
* `Content-Type`, and `attrName` names one of that field's parameters, such as `charset` or
|
|
1435
|
+
* `name`.
|
|
1436
|
+
*
|
|
1437
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1438
|
+
* {@link Email.lastErrorText}.
|
|
1439
|
+
*/
|
|
1440
|
+
getAttachmentAttr(index: number, fieldName: string, attrName: string): string
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* Returns the ContentID header field for the Nth attachment. The first attachment is at index 0.
|
|
1444
|
+
*
|
|
1445
|
+
* `index` is zero-based. The returned value is the identifier used by `cid:` references when the
|
|
1446
|
+
* attachment is referenced inline.
|
|
1447
|
+
*
|
|
1448
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1449
|
+
* {@link Email.lastErrorText}.
|
|
1450
|
+
*/
|
|
1451
|
+
getAttachmentContentID(index: number): string
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Returns the `Content-Type` header field for the Nth attachment. Indexing of attachments begins
|
|
1455
|
+
* at 0.
|
|
1456
|
+
*
|
|
1457
|
+
* `index` is zero-based. The result is the MIME media type without implying that the filename
|
|
1458
|
+
* extension is trustworthy.
|
|
1459
|
+
*
|
|
1460
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1461
|
+
* {@link Email.lastErrorText}.
|
|
1462
|
+
*/
|
|
1463
|
+
getAttachmentContentType(index: number): string
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* Retrieves an attachment's filename.
|
|
1467
|
+
*
|
|
1468
|
+
* `index` is zero-based. The returned value is the filename stored in MIME. It may contain path
|
|
1469
|
+
* information or characters that are not valid in a local filesystem filename. When {@link
|
|
1470
|
+
* Email.saveAllAttachments} or {@link Email.saveAttachedFile} saves the attachment, Chilkat
|
|
1471
|
+
* ignores MIME path components and sanitizes the final filename as described by those methods.
|
|
1472
|
+
*
|
|
1473
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1474
|
+
* {@link Email.lastErrorText}.
|
|
1475
|
+
*/
|
|
1476
|
+
getAttachmentFilename(index: number): string
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* Returns the value of a header field (by name) of an attachment.
|
|
1480
|
+
*
|
|
1481
|
+
* `attachIndex` is a zero-based attachment index and `fieldName` is the MIME header-field name.
|
|
1482
|
+
* Header-field names are case-insensitive.
|
|
1483
|
+
*
|
|
1484
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1485
|
+
* {@link Email.lastErrorText}.
|
|
1486
|
+
*/
|
|
1487
|
+
getAttachmentHeader(attachIndex: number, fieldName: string): string
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
* Returns the size, in bytes, of the attachment at the zero-based index specified by `index`.
|
|
1491
|
+
* Returns `-1` if `index` does not identify an existing attachment.
|
|
1492
|
+
*
|
|
1493
|
+
* The returned value is the decoded attachment content size, not the number of Base64 characters
|
|
1494
|
+
* in the MIME representation.
|
|
1495
|
+
*/
|
|
1496
|
+
getAttachmentSize(index: number): number
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* Returns the attachment at the zero-based index specified by `index` as text.
|
|
1500
|
+
*
|
|
1501
|
+
* `charset` specifies the charset used to interpret the attachment bytes, such as `utf-8`. CRLF
|
|
1502
|
+
* sequences in the attachment are normalized to single newline characters in the returned string.
|
|
1503
|
+
*
|
|
1504
|
+
* `index` is zero-based. `charset` controls conversion of the attachment bytes to Unicode; use a
|
|
1505
|
+
* binary attachment getter when the content is not text.
|
|
1506
|
+
*
|
|
1507
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1508
|
+
* {@link Email.lastErrorText}.
|
|
1509
|
+
*/
|
|
1510
|
+
getAttachmentString(index: number, charset: string): string
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* Retrieves an attachment's data as a String. All end-of-lines will be translated to CRLF
|
|
1514
|
+
* sequences.
|
|
1515
|
+
*
|
|
1516
|
+
* `index` is a zero-based attachment index. `charset` specifies the charset used to decode the
|
|
1517
|
+
* attachment bytes to Unicode text.
|
|
1518
|
+
*
|
|
1519
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1520
|
+
* {@link Email.lastErrorText}.
|
|
1521
|
+
*/
|
|
1522
|
+
getAttachmentStringCrLf(index: number, charset: string): string
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* Returns a blind carbon-copy recipient's full email address.
|
|
1526
|
+
*
|
|
1527
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`. The result may include both
|
|
1528
|
+
* display name and address.
|
|
1529
|
+
*
|
|
1530
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1531
|
+
* {@link Email.lastErrorText}.
|
|
1532
|
+
*/
|
|
1533
|
+
getBcc(index: number): string
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Returns the Nth BCC address (only the address part, not the friendly-name part).
|
|
1537
|
+
*
|
|
1538
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1539
|
+
*
|
|
1540
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1541
|
+
* {@link Email.lastErrorText}.
|
|
1542
|
+
*/
|
|
1543
|
+
getBccAddr(index: number): string
|
|
1544
|
+
|
|
1545
|
+
/**
|
|
1546
|
+
* Returns the Nth BCC name (only the friendly-name part, not the address part).
|
|
1547
|
+
*
|
|
1548
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1549
|
+
*
|
|
1550
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1551
|
+
* {@link Email.lastErrorText}.
|
|
1552
|
+
*/
|
|
1553
|
+
getBccName(index: number): string
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* Returns a carbon-copy recipient's full email address.
|
|
1557
|
+
*
|
|
1558
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`. The result may include both
|
|
1559
|
+
* display name and address.
|
|
1560
|
+
*
|
|
1561
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1562
|
+
* {@link Email.lastErrorText}.
|
|
1563
|
+
*/
|
|
1564
|
+
getCC(index: number): string
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* Returns the Nth CC address (only the address part, not the friendly-name part).
|
|
1568
|
+
*
|
|
1569
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1570
|
+
*
|
|
1571
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1572
|
+
* {@link Email.lastErrorText}.
|
|
1573
|
+
*/
|
|
1574
|
+
getCcAddr(index: number): string
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Returns the Nth CC name (only the friendly-name part, not the address part).
|
|
1578
|
+
*
|
|
1579
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1580
|
+
*
|
|
1581
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1582
|
+
* {@link Email.lastErrorText}.
|
|
1583
|
+
*/
|
|
1584
|
+
getCcName(index: number): string
|
|
1585
|
+
|
|
1586
|
+
/**
|
|
1587
|
+
* Returns a field from the `message/delivery-status` part of a delivery-status notification.
|
|
1588
|
+
*
|
|
1589
|
+
* Call this method only for an email identified as a `multipart/report` delivery-status
|
|
1590
|
+
* notification. `fieldName` specifies the field name, such as `Final-Recipient`, `Status`,
|
|
1591
|
+
* `Action`, or `Reporting-MTA`.
|
|
1592
|
+
*
|
|
1593
|
+
* ```
|
|
1594
|
+
* Reporting-MTA: dns; XYZ.abc.nl
|
|
1595
|
+
*
|
|
1596
|
+
* Final-Recipient: RFC822; someEmailAddr@doesnotexist123.nl
|
|
1597
|
+
* Action: failed
|
|
1598
|
+
* Status: 5.4.4
|
|
1599
|
+
* ```
|
|
1600
|
+
*
|
|
1601
|
+
* `fieldName` names a field in the delivery-status section. This method reads the report already
|
|
1602
|
+
* present in the email object and performs no server query.
|
|
1603
|
+
*
|
|
1604
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1605
|
+
* {@link Email.lastErrorText}.
|
|
1606
|
+
*/
|
|
1607
|
+
getDeliveryStatusInfo(fieldName: string): string
|
|
1608
|
+
|
|
1609
|
+
/**
|
|
1610
|
+
* Returns the value of a header field.
|
|
1611
|
+
*
|
|
1612
|
+
* Header-field names are case-insensitive. If a field occurs more than once, use indexed header
|
|
1613
|
+
* enumeration when each occurrence must be inspected separately.
|
|
1614
|
+
*
|
|
1615
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1616
|
+
* {@link Email.lastErrorText}.
|
|
1617
|
+
*/
|
|
1618
|
+
getHeaderField(fieldName: string): string
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* Returns the name of the Nth header field. The {@link Email.numHeaderFields} property gives the
|
|
1622
|
+
* number of header fields. Use {@link Email.getHeaderField} to retrieve a header field value by
|
|
1623
|
+
* name.
|
|
1624
|
+
*
|
|
1625
|
+
* The first header field is at index 0. (All Chilkat indexing is 0-based.)
|
|
1626
|
+
*
|
|
1627
|
+
* `index` is zero-based; valid values are from `0` through `2 - 1`. Repeated fields appear as
|
|
1628
|
+
* separate entries.
|
|
1629
|
+
*
|
|
1630
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1631
|
+
* {@link Email.lastErrorText}.
|
|
1632
|
+
*/
|
|
1633
|
+
getHeaderFieldName(index: number): string
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* Returns the value of the Nth header field. (Indexing begins at 0) The number of header fields
|
|
1637
|
+
* can be obtained from the {@link Email.numHeaderFields} property.
|
|
1638
|
+
*
|
|
1639
|
+
* The first header field is at index 0, the last header field is at index {@link
|
|
1640
|
+
* Email.numHeaderFields}-1. (All Chilkat indexing is 0-based.)
|
|
1641
|
+
*
|
|
1642
|
+
* `index` is zero-based; valid values are from `0` through `2 - 1`. Use the same index with
|
|
1643
|
+
* {@link Email.getHeaderFieldName} to identify the field.
|
|
1644
|
+
*
|
|
1645
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1646
|
+
* {@link Email.lastErrorText}.
|
|
1647
|
+
*/
|
|
1648
|
+
getHeaderFieldValue(index: number): string
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* Returns the body having the `text/html` content type.
|
|
1652
|
+
*
|
|
1653
|
+
* This reads the HTML representation already present in the email object. It does not
|
|
1654
|
+
* automatically inline related images; use {@link Email.getHtmlBodySb} for that option.
|
|
1655
|
+
*
|
|
1656
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1657
|
+
* {@link Email.lastErrorText}.
|
|
1658
|
+
*/
|
|
1659
|
+
getHtmlBody(): string
|
|
1660
|
+
|
|
1661
|
+
/**
|
|
1662
|
+
* When email headers are downloaded from an IMAP server (using Chilkat IMAP), a `ckx-imap-uid`
|
|
1663
|
+
* header field is added. The content of this header is the UID or sequence number of the email on
|
|
1664
|
+
* the IMAP server. In addition, a `ckx-imap-isUid` header field is added, and this will have the
|
|
1665
|
+
* value YES or NO. If the value is YES, then `ckx-imap-uid` contains a UID, if the value is NO,
|
|
1666
|
+
* then `ckx-imap-uid` contains the sequence number. This method returns the UID if `ckx-imap-uid`
|
|
1667
|
+
* exists and contains a UID, otherwise it returns 0xFFFFFFFF.
|
|
1668
|
+
*
|
|
1669
|
+
* An application that wishes to download the full email would use this UID and then call the
|
|
1670
|
+
* Chilkat IMAP object's FetchSingle or FetchSingleAsMime methods.
|
|
1671
|
+
*
|
|
1672
|
+
* **Note:** If an email was downloaded from the IMAP server in a way such that the UID is not
|
|
1673
|
+
* received, then there will be no `ckx-imap-uid` header field and this method would return
|
|
1674
|
+
* 0xFFFFFFFF. For example, if emails are downloaded by sequence numbers via the
|
|
1675
|
+
* `Imap.FetchSequence` method, then UIDs are not used and therefore the email object will not
|
|
1676
|
+
* contain this information.
|
|
1677
|
+
*
|
|
1678
|
+
* This reads Chilkat metadata stored in the email object; it does not contact the IMAP server.
|
|
1679
|
+
* The accompanying Boolean output distinguishes a stable UID from a mailbox sequence number.
|
|
1680
|
+
*/
|
|
1681
|
+
getImapUid(): number
|
|
1682
|
+
|
|
1683
|
+
/**
|
|
1684
|
+
* Returns the email as RFC822/MIME text containing the headers, body representations, related
|
|
1685
|
+
* items, and attachments.
|
|
1686
|
+
*
|
|
1687
|
+
* The result is suitable for saving as an `.eml` file or passing to an API that accepts MIME
|
|
1688
|
+
* text.
|
|
1689
|
+
*
|
|
1690
|
+
* Serialization may normalize header whitespace, `Content-Type` parameters, transfer encodings,
|
|
1691
|
+
* and other MIME formatting. Therefore, MIME that is loaded and then reserialized is not
|
|
1692
|
+
* guaranteed to be byte-for-byte identical to the original input. Repeated calls without
|
|
1693
|
+
* modifying the email return the same current serialized form.
|
|
1694
|
+
*
|
|
1695
|
+
* Headers that were explicitly removed, such as `Date`, `Message-ID`, or `MIME-Version`, are not
|
|
1696
|
+
* necessarily regenerated by this method.
|
|
1697
|
+
*
|
|
1698
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1699
|
+
* {@link Email.lastErrorText}.
|
|
1700
|
+
*/
|
|
1701
|
+
getMime(): string
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* Returns the text content of the Nth non-multipart MIME part matching the `Content-Type` pattern
|
|
1705
|
+
* in `contentType`. `index` is a zero-based index among the matching parts.
|
|
1706
|
+
*
|
|
1707
|
+
* `contentType` may be an exact `Content-Type`, such as `text/plain`, or a wildcard pattern, such
|
|
1708
|
+
* as `text/*` or `*`. Use {@link Email.getNumPartsOfType} to determine the number of matching
|
|
1709
|
+
* parts.
|
|
1710
|
+
*
|
|
1711
|
+
* When `inlineOnly` is `true`, only parts having an `inline` `Content-Disposition` are
|
|
1712
|
+
* considered. When `excludeAttachments` is `true`, parts having an `attachment`
|
|
1713
|
+
* `Content-Disposition` are excluded.
|
|
1714
|
+
*
|
|
1715
|
+
* **Note:** A header-only email, or an email downloaded from IMAP without attachments, does not
|
|
1716
|
+
* contain every MIME part from the complete message.
|
|
1717
|
+
*
|
|
1718
|
+
* Use {@link Email.getNumPartsOfType} with the same filters to determine the valid zero-based
|
|
1719
|
+
* index range before retrieving a part.
|
|
1720
|
+
*
|
|
1721
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1722
|
+
* {@link Email.lastErrorText}.
|
|
1723
|
+
*/
|
|
1724
|
+
getNthTextPartOfType(index: number, contentType: string, inlineOnly: boolean, excludeAttachments: boolean): string
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* Returns the number of non-multipart MIME parts matching the `Content-Type` pattern in
|
|
1728
|
+
* `contentType`.
|
|
1729
|
+
*
|
|
1730
|
+
* `contentType` may be an exact `Content-Type`, such as `text/plain`, or a wildcard pattern, such
|
|
1731
|
+
* as `text/*` or `*`. When `inlineOnly` is `true`, only parts having an `inline`
|
|
1732
|
+
* `Content-Disposition` are counted. When `excludeAttachments` is `true`, parts having an
|
|
1733
|
+
* `attachment` `Content-Disposition` are excluded.
|
|
1734
|
+
*
|
|
1735
|
+
* **Note:** A header-only email, or an email downloaded from IMAP without attachments, does not
|
|
1736
|
+
* contain every MIME part from the complete message.
|
|
1737
|
+
*
|
|
1738
|
+
* The count is based on the MIME parts currently loaded in the email object. No attachment or
|
|
1739
|
+
* body data is fetched from a server by this method.
|
|
1740
|
+
*/
|
|
1741
|
+
getNumPartsOfType(contentType: string, inlineOnly: boolean, excludeAttachments: boolean): number
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* Returns the email body having the `text/plain` content type.
|
|
1745
|
+
*
|
|
1746
|
+
* This reads the plain-text representation already present in the email object. It does not
|
|
1747
|
+
* convert the HTML body to plain text.
|
|
1748
|
+
*
|
|
1749
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1750
|
+
* {@link Email.lastErrorText}.
|
|
1751
|
+
*/
|
|
1752
|
+
getPlainTextBody(): string
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* Returns a header field attribute value from the header field of the Nth related item.
|
|
1756
|
+
*
|
|
1757
|
+
* `index` is a zero-based related-item index. `fieldName` names a MIME header field and
|
|
1758
|
+
* `attrName` names one of that field's parameters.
|
|
1759
|
+
*
|
|
1760
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1761
|
+
* {@link Email.lastErrorText}.
|
|
1762
|
+
*/
|
|
1763
|
+
getRelatedAttr(index: number, fieldName: string, attrName: string): string
|
|
1764
|
+
|
|
1765
|
+
/**
|
|
1766
|
+
* Returns the content ID of a related item contained with the email. Related items are typically
|
|
1767
|
+
* images and style-sheets embedded within HTML emails.
|
|
1768
|
+
*
|
|
1769
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`. The value is normally
|
|
1770
|
+
* referenced from HTML as a `cid:` URL.
|
|
1771
|
+
*
|
|
1772
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1773
|
+
* {@link Email.lastErrorText}.
|
|
1774
|
+
*/
|
|
1775
|
+
getRelatedContentID(index: number): string
|
|
1776
|
+
|
|
1777
|
+
/**
|
|
1778
|
+
* Returns the `Content-Location` of a related item contained with the email. Related items are
|
|
1779
|
+
* typically images and style-sheets embedded within HTML emails.
|
|
1780
|
+
*
|
|
1781
|
+
* `index` is zero-based. `Content-Location` is an alternative to `Content-ID` for identifying a
|
|
1782
|
+
* resource referenced by the HTML body.
|
|
1783
|
+
*
|
|
1784
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1785
|
+
* {@link Email.lastErrorText}.
|
|
1786
|
+
*/
|
|
1787
|
+
getRelatedContentLocation(index: number): string
|
|
1788
|
+
|
|
1789
|
+
/**
|
|
1790
|
+
* Returns the `Content-Type` of the Nth related content item in an email message.
|
|
1791
|
+
*
|
|
1792
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1793
|
+
*
|
|
1794
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1795
|
+
* {@link Email.lastErrorText}.
|
|
1796
|
+
*/
|
|
1797
|
+
getRelatedContentType(index: number): string
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* Returns the filename of a related item contained with the email. Related items are typically
|
|
1801
|
+
* images and style-sheets embedded within HTML emails.
|
|
1802
|
+
*
|
|
1803
|
+
* `index` is zero-based. The returned MIME filename should be sanitized before it is used as a
|
|
1804
|
+
* local filesystem path.
|
|
1805
|
+
*
|
|
1806
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1807
|
+
* {@link Email.lastErrorText}.
|
|
1808
|
+
*/
|
|
1809
|
+
getRelatedFilename(index: number): string
|
|
1810
|
+
|
|
1811
|
+
/**
|
|
1812
|
+
* Returns the text with CR line-endings of a related item contained with the email. Related items
|
|
1813
|
+
* are typically images and style-sheets embedded within HTML emails.
|
|
1814
|
+
*
|
|
1815
|
+
* `index` is zero-based and `charset` specifies the charset used to decode the related-item bytes
|
|
1816
|
+
* to Unicode text.
|
|
1817
|
+
*
|
|
1818
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1819
|
+
* {@link Email.lastErrorText}.
|
|
1820
|
+
*/
|
|
1821
|
+
getRelatedString(index: number, charset: string): string
|
|
1822
|
+
|
|
1823
|
+
/**
|
|
1824
|
+
* Returns the text with CRLF line-endings of a related item contained with the email. Related
|
|
1825
|
+
* items are typically images and style-sheets embedded within HTML emails.
|
|
1826
|
+
*
|
|
1827
|
+
* `index` is zero-based and `charset` specifies the charset used to decode the related-item bytes
|
|
1828
|
+
* to Unicode text.
|
|
1829
|
+
*
|
|
1830
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1831
|
+
* {@link Email.lastErrorText}.
|
|
1832
|
+
*/
|
|
1833
|
+
getRelatedStringCrLf(index: number, charset: string): string
|
|
1834
|
+
|
|
1835
|
+
/**
|
|
1836
|
+
* Returns a replacement pattern previously defined for mail-merge operations.
|
|
1837
|
+
*
|
|
1838
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1839
|
+
*
|
|
1840
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1841
|
+
* {@link Email.lastErrorText}.
|
|
1842
|
+
*/
|
|
1843
|
+
getReplacePattern(index: number): string
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* Returns a replacement string for a previously defined pattern/replacement string pair. (This is
|
|
1847
|
+
* a mail-merge feature.)
|
|
1848
|
+
*
|
|
1849
|
+
* **Note:** This method was found to not be working correctly and is fixed in Chilkat v9.5.0.91.
|
|
1850
|
+
*
|
|
1851
|
+
* `index` is a zero-based pattern index. Use {@link Email.numReplacePatterns} to determine the
|
|
1852
|
+
* valid range.
|
|
1853
|
+
*
|
|
1854
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1855
|
+
* {@link Email.lastErrorText}.
|
|
1856
|
+
*/
|
|
1857
|
+
getReplaceString(index: number): string
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* Returns a replacement string for a previously defined pattern/replacement string pair. (This is
|
|
1861
|
+
* a mail-merge feature.)
|
|
1862
|
+
*
|
|
1863
|
+
* `pattern` is the previously registered pattern text, not a numeric index.
|
|
1864
|
+
*
|
|
1865
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1866
|
+
* {@link Email.lastErrorText}.
|
|
1867
|
+
*/
|
|
1868
|
+
getReplaceString2(pattern: string): string
|
|
1869
|
+
|
|
1870
|
+
/**
|
|
1871
|
+
* (See the {@link Email.numReports} property.) Returns the body content of the Nth report within
|
|
1872
|
+
* a multipart/report email.
|
|
1873
|
+
*
|
|
1874
|
+
* Multipart/report is a message type that contains data formatted for a mail server to read. It
|
|
1875
|
+
* is split between a text/plain (or some other content/type easily readable) and a
|
|
1876
|
+
* message/delivery-status, which contains the data formatted for the mail server to read.
|
|
1877
|
+
*
|
|
1878
|
+
* It is defined in RFC 3462
|
|
1879
|
+
*
|
|
1880
|
+
* `index` is zero-based; valid values are from `0` through `1 - 1`.
|
|
1881
|
+
*
|
|
1882
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1883
|
+
* {@link Email.lastErrorText}.
|
|
1884
|
+
*/
|
|
1885
|
+
getReport(index: number): string
|
|
1886
|
+
|
|
1887
|
+
/**
|
|
1888
|
+
* Returns a `to` recipient's full email address.
|
|
1889
|
+
*
|
|
1890
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`. The result may include both
|
|
1891
|
+
* display name and address.
|
|
1892
|
+
*
|
|
1893
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1894
|
+
* {@link Email.lastErrorText}.
|
|
1895
|
+
*/
|
|
1896
|
+
getTo(index: number): string
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* Returns the Nth To address (only the address part, not the friendly-name part).
|
|
1900
|
+
*
|
|
1901
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1902
|
+
*
|
|
1903
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1904
|
+
* {@link Email.lastErrorText}.
|
|
1905
|
+
*/
|
|
1906
|
+
getToAddr(index: number): string
|
|
1907
|
+
|
|
1908
|
+
/**
|
|
1909
|
+
* Returns the Nth To name (only the friendly-name part, not the address part).
|
|
1910
|
+
*
|
|
1911
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`.
|
|
1912
|
+
*
|
|
1913
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1914
|
+
* {@link Email.lastErrorText}.
|
|
1915
|
+
*/
|
|
1916
|
+
getToName(index: number): string
|
|
1917
|
+
|
|
1918
|
+
/**
|
|
1919
|
+
* Convert the email object to an XML document in memory
|
|
1920
|
+
*
|
|
1921
|
+
* The XML is Chilkat's email-object representation, not MIME and not a standardized interchange
|
|
1922
|
+
* format. Use {@link Email.getMime} when an RFC822/MIME message is required.
|
|
1923
|
+
*
|
|
1924
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1925
|
+
* {@link Email.lastErrorText}.
|
|
1926
|
+
*/
|
|
1927
|
+
getXml(): string
|
|
1928
|
+
|
|
1929
|
+
/**
|
|
1930
|
+
* Returns `true` when the email contains a header field named `fieldName` whose value matches the
|
|
1931
|
+
* wildcard pattern in `valuePattern`.
|
|
1932
|
+
*
|
|
1933
|
+
* `valuePattern` may contain any number of `*` characters, where each asterisk matches zero or
|
|
1934
|
+
* more characters. `caseSensitive` controls whether matching is case-sensitive.
|
|
1935
|
+
*
|
|
1936
|
+
* The pattern syntax is a simple wildcard match, not a regular expression. Header-field names are
|
|
1937
|
+
* compared without regard to case.
|
|
1938
|
+
*/
|
|
1939
|
+
hasHeaderMatching(fieldName: string, valuePattern: string, caseSensitive: boolean): boolean
|
|
1940
|
+
|
|
1941
|
+
/**
|
|
1942
|
+
* Returns `true` if the email has an HTML body.
|
|
1943
|
+
*
|
|
1944
|
+
* Returns `true` only when a `text/html` body is present in the current email object.
|
|
1945
|
+
*/
|
|
1946
|
+
hasHtmlBody(): boolean
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Returns `true` if the email has a plain-text body.
|
|
1950
|
+
*
|
|
1951
|
+
* Returns `true` only when a `text/plain` body is present in the current email object.
|
|
1952
|
+
*/
|
|
1953
|
+
hasPlainTextBody(): boolean
|
|
1954
|
+
|
|
1955
|
+
/**
|
|
1956
|
+
* Returns `true` if the email is a multipart/report email.
|
|
1957
|
+
*
|
|
1958
|
+
* Returns `true` when the top-level message structure is a `multipart/report`. Use {@link
|
|
1959
|
+
* Email.getDsnInfo} or {@link Email.getReport} to examine report content.
|
|
1960
|
+
*/
|
|
1961
|
+
isMultipartReport(): boolean
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* Loads a complete email from an `.eml` file. An EML file contains RFC822/MIME message text.
|
|
1965
|
+
*
|
|
1966
|
+
* On success, the loaded message replaces the entire current email, including recipients,
|
|
1967
|
+
* headers, bodies, related items, and attachments. If the file cannot be opened or parsed and the
|
|
1968
|
+
* method fails, the email content that existed before the call is preserved.
|
|
1969
|
+
*
|
|
1970
|
+
* The file is parsed locally; this method does not connect to an SMTP, POP3, or IMAP server.
|
|
1971
|
+
*
|
|
1972
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1973
|
+
* {@link Email.lastErrorText}.
|
|
1974
|
+
*/
|
|
1975
|
+
loadEml(mimePath: string): void
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* Loads an email from a Chilkat XML email file.
|
|
1979
|
+
*
|
|
1980
|
+
* On success, the loaded message replaces the entire current email, including recipients,
|
|
1981
|
+
* headers, bodies, related items, and attachments. If the file cannot be opened or parsed and the
|
|
1982
|
+
* method fails, the email content that existed before the call is preserved.
|
|
1983
|
+
*
|
|
1984
|
+
* The file must contain XML previously produced by Chilkat email serialization. It is not an
|
|
1985
|
+
* arbitrary XML-to-email conversion method.
|
|
1986
|
+
*
|
|
1987
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1988
|
+
* {@link Email.lastErrorText}.
|
|
1989
|
+
*/
|
|
1990
|
+
loadXml(xmlPath: string): void
|
|
1991
|
+
|
|
1992
|
+
/**
|
|
1993
|
+
* Loads an email from the Chilkat XML representation in `xmlStr`, typically obtained from {@link
|
|
1994
|
+
* Email.getXml}.
|
|
1995
|
+
*
|
|
1996
|
+
* On success, the loaded message replaces the entire current email, including recipients,
|
|
1997
|
+
* headers, bodies, related items, and attachments. If `xmlStr` cannot be parsed and the method
|
|
1998
|
+
* fails, the email content that existed before the call is preserved.
|
|
1999
|
+
*
|
|
2000
|
+
* This is a local parsing operation and does not connect to a mail server.
|
|
2001
|
+
*
|
|
2002
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2003
|
+
* {@link Email.lastErrorText}.
|
|
2004
|
+
*/
|
|
2005
|
+
loadXmlString(xmlStr: string): void
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* Converts the Unicode string in `str` to the charset specified by `charset`, Q-encodes the
|
|
2009
|
+
* resulting multibyte data, and returns the encoded string.
|
|
2010
|
+
*
|
|
2011
|
+
* Q-encoding is commonly used in RFC 2047 encoded words for non-ASCII MIME header text. `charset`
|
|
2012
|
+
* controls the byte charset used before Q-encoding.
|
|
2013
|
+
*
|
|
2014
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2015
|
+
* {@link Email.lastErrorText}.
|
|
2016
|
+
*/
|
|
2017
|
+
qEncodeString(str: string, charset: string): string
|
|
2018
|
+
|
|
2019
|
+
/**
|
|
2020
|
+
* Removes the Nth message/rfc822 sub-part of the email. Indexing begins at 0.
|
|
2021
|
+
*
|
|
2022
|
+
* `idx` is zero-based; valid values are from `0` through `0 - 1`. This changes only the
|
|
2023
|
+
* in-memory email.
|
|
2024
|
+
*/
|
|
2025
|
+
removeAttachedMessage(idx: number): void
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Removes all message/rfc822 sub-parts of the email object.
|
|
2029
|
+
*
|
|
2030
|
+
* This does not remove ordinary file attachments or related HTML resources.
|
|
2031
|
+
*/
|
|
2032
|
+
removeAttachedMessages(): void
|
|
2033
|
+
|
|
2034
|
+
/**
|
|
2035
|
+
* Removes relative or absolute path information from attachment filenames stored in the MIME,
|
|
2036
|
+
* leaving only each final filename component.
|
|
2037
|
+
*
|
|
2038
|
+
* This changes the MIME filename metadata only. It does not affect the behavior of {@link
|
|
2039
|
+
* Email.saveAllAttachments} or {@link Email.saveAttachedFile}, because those methods already
|
|
2040
|
+
* ignore path information in MIME attachment filenames and save beneath the directory specified
|
|
2041
|
+
* by the application.
|
|
2042
|
+
*/
|
|
2043
|
+
removeAttachmentPaths(): void
|
|
2044
|
+
|
|
2045
|
+
/**
|
|
2046
|
+
* Removes by name all occurrences of a header field.
|
|
2047
|
+
*
|
|
2048
|
+
* Header-field names are case-insensitive. All repeated occurrences having the specified name are
|
|
2049
|
+
* removed from the current email object.
|
|
2050
|
+
*/
|
|
2051
|
+
removeHeaderField(fieldName: string): void
|
|
2052
|
+
|
|
2053
|
+
/**
|
|
2054
|
+
* Removes the HTML body from the email (if an HTML body exists).
|
|
2055
|
+
*
|
|
2056
|
+
* Other body representations, attachments, and related items remain unchanged.
|
|
2057
|
+
*/
|
|
2058
|
+
removeHtmlAlternative(): void
|
|
2059
|
+
|
|
2060
|
+
/**
|
|
2061
|
+
* Removes the plain-text body from the email (if a plain-text body exists).
|
|
2062
|
+
*
|
|
2063
|
+
* Other body representations, attachments, and related items remain unchanged.
|
|
2064
|
+
*/
|
|
2065
|
+
removePlainTextAlternative(): void
|
|
2066
|
+
|
|
2067
|
+
/**
|
|
2068
|
+
* Saves all attachments to the directory specified by `dirPath`. If `dirPath` or any of its
|
|
2069
|
+
* directory components do not exist, Chilkat creates them automatically. The {@link
|
|
2070
|
+
* Email.overwriteExisting} property controls whether existing files may be overwritten.
|
|
2071
|
+
*
|
|
2072
|
+
* Chilkat first uses the filename from the MIME `Content-Disposition` header. If no filename is
|
|
2073
|
+
* present there, it uses the `name` parameter from the `Content-Type` header. If neither is
|
|
2074
|
+
* present, the attachment is saved as `attachedFile.txt`.
|
|
2075
|
+
*
|
|
2076
|
+
* If the selected MIME filename contains relative or absolute path information, Chilkat ignores
|
|
2077
|
+
* the path and uses only the final filename component. The file is always written beneath the
|
|
2078
|
+
* application-specified directory in `dirPath`.
|
|
2079
|
+
*
|
|
2080
|
+
* On Windows, Chilkat converts the final MIME filename component to a valid Windows filename. It
|
|
2081
|
+
* replaces `|` and a `:` that is not part of a drive specification with `_`; removes `<`, `>`,
|
|
2082
|
+
* `*`, `?`, and `"`; and interprets `/` and `\` as path separators, so the path is omitted. If
|
|
2083
|
+
* the colon belongs to a drive specification such as `C:\`, it is discarded with the path. For
|
|
2084
|
+
* example, `a<b>c:d|e?f*g.txt` is saved as `abc_d_efg.txt`.
|
|
2085
|
+
*
|
|
2086
|
+
* Attachment filenames can be changed before saving. The number of attachments is available in
|
|
2087
|
+
* the {@link Email.numAttachments} property. An application can call {@link
|
|
2088
|
+
* Email.getAttachmentFilename} for each zero-based index and change a filename by calling {@link
|
|
2089
|
+
* Email.setAttachmentFilename}.
|
|
2090
|
+
*
|
|
2091
|
+
* Only attachments already present in the email object are saved. A message downloaded without
|
|
2092
|
+
* attachment bodies must first have those bodies fetched by the mail protocol component.
|
|
2093
|
+
*
|
|
2094
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2095
|
+
* {@link Email.lastErrorText}.
|
|
2096
|
+
*/
|
|
2097
|
+
saveAllAttachments(dirPath: string): void
|
|
2098
|
+
|
|
2099
|
+
/**
|
|
2100
|
+
* Saves the attachment at the zero-based index specified by `index` to the directory specified by
|
|
2101
|
+
* `dirPath`. If `dirPath` or any of its directory components do not exist, Chilkat creates them
|
|
2102
|
+
* automatically. The {@link Email.overwriteExisting} property controls whether an existing file
|
|
2103
|
+
* may be overwritten.
|
|
2104
|
+
*
|
|
2105
|
+
* Chilkat first uses the filename from the MIME `Content-Disposition` header. If no filename is
|
|
2106
|
+
* present there, it uses the `name` parameter from the `Content-Type` header. If neither is
|
|
2107
|
+
* present, the attachment is saved as `attachedFile.txt`.
|
|
2108
|
+
*
|
|
2109
|
+
* If the selected MIME filename contains relative or absolute path information, Chilkat ignores
|
|
2110
|
+
* the path and uses only the final filename component. The file is always written beneath the
|
|
2111
|
+
* application-specified directory in `dirPath`.
|
|
2112
|
+
*
|
|
2113
|
+
* On Windows, Chilkat converts the final MIME filename component to a valid Windows filename. It
|
|
2114
|
+
* replaces `|` and a `:` that is not part of a drive specification with `_`; removes `<`, `>`,
|
|
2115
|
+
* `*`, `?`, and `"`; and interprets `/` and `\` as path separators, so the path is omitted. If
|
|
2116
|
+
* the colon belongs to a drive specification such as `C:\`, it is discarded with the path. For
|
|
2117
|
+
* example, `a<b>c:d|e?f*g.txt` is saved as `abc_d_efg.txt`.
|
|
2118
|
+
*
|
|
2119
|
+
* The attachment data must already be present in the current `Email` object. This method does not
|
|
2120
|
+
* retrieve missing attachment data from a mail server.
|
|
2121
|
+
*
|
|
2122
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2123
|
+
* {@link Email.lastErrorText}.
|
|
2124
|
+
*/
|
|
2125
|
+
saveAttachedFile(index: number, dirPath: string): void
|
|
2126
|
+
|
|
2127
|
+
/**
|
|
2128
|
+
* Convert this email object to EML and save it to a file.
|
|
2129
|
+
*
|
|
2130
|
+
* An EML file contains the complete RFC822/MIME message, including headers, bodies, related
|
|
2131
|
+
* items, and attachments.
|
|
2132
|
+
*
|
|
2133
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2134
|
+
* {@link Email.lastErrorText}.
|
|
2135
|
+
*/
|
|
2136
|
+
saveEml(emlFilePath: string): void
|
|
2137
|
+
|
|
2138
|
+
/**
|
|
2139
|
+
* Saves the related item at the zero-based index specified by `index` to the directory specified
|
|
2140
|
+
* by `dirPath`. If `dirPath` or any of its directory components do not exist, Chilkat creates
|
|
2141
|
+
* them automatically. Valid indexes are from `0` through `0 - 1`. The {@link
|
|
2142
|
+
* Email.overwriteExisting} property controls whether an existing file may be overwritten.
|
|
2143
|
+
*
|
|
2144
|
+
* If the related item's MIME filename contains relative or absolute path information, Chilkat
|
|
2145
|
+
* ignores the path and uses only the final filename component. The file is always written beneath
|
|
2146
|
+
* the application-specified directory in `dirPath`.
|
|
2147
|
+
*
|
|
2148
|
+
* Related items are typically images, style sheets, or other resources used by an HTML body. The
|
|
2149
|
+
* related-item data must already be present in the email object.
|
|
2150
|
+
*
|
|
2151
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2152
|
+
* {@link Email.lastErrorText}.
|
|
2153
|
+
*/
|
|
2154
|
+
saveRelatedItem(index: number, dirPath: string): void
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* Convert this email object to XML and save it to a file.
|
|
2158
|
+
*
|
|
2159
|
+
* The generated XML is Chilkat's email-object serialization and can later be loaded with {@link
|
|
2160
|
+
* Email.loadXml}. Use {@link Email.saveEml} for a standard MIME message file.
|
|
2161
|
+
*
|
|
2162
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2163
|
+
* {@link Email.lastErrorText}.
|
|
2164
|
+
*/
|
|
2165
|
+
saveXml(path: string): void
|
|
2166
|
+
|
|
2167
|
+
/**
|
|
2168
|
+
* Sets the `charset` parameter of the `Content-Type` header field for the attachment at the
|
|
2169
|
+
* zero-based index specified by `index`. `charset` specifies the charset, such as `Shift_JIS`,
|
|
2170
|
+
* `iso-8859-2`, `big5`, or `iso-8859-5`.
|
|
2171
|
+
*
|
|
2172
|
+
* This updates MIME metadata and does not transcode the attachment bytes. Use it only when the
|
|
2173
|
+
* bytes are already encoded in the charset specified by `charset`.
|
|
2174
|
+
*
|
|
2175
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2176
|
+
* {@link Email.lastErrorText}.
|
|
2177
|
+
*/
|
|
2178
|
+
setAttachmentCharset(index: number, charset: string): void
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
* Sets the `Content-Disposition` value for the attachment at the zero-based index specified by
|
|
2182
|
+
* `index`.
|
|
2183
|
+
*
|
|
2184
|
+
* The default disposition is `attachment`. Set `disposition` to `inline` when the attachment
|
|
2185
|
+
* should be presented as inline content.
|
|
2186
|
+
*
|
|
2187
|
+
* `index` is zero-based. `inline` suggests that a mail client may display the part in the
|
|
2188
|
+
* message, while `attachment` suggests a separate downloadable file.
|
|
2189
|
+
*
|
|
2190
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2191
|
+
* {@link Email.lastErrorText}.
|
|
2192
|
+
*/
|
|
2193
|
+
setAttachmentDisposition(index: number, disposition: string): void
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* Changes the filename of the attachment at the zero-based index specified by `index`. `filename`
|
|
2197
|
+
* contains the new filename.
|
|
2198
|
+
*
|
|
2199
|
+
* `index` is zero-based. This changes the filename stored in MIME and does not rename any
|
|
2200
|
+
* original local file.
|
|
2201
|
+
*
|
|
2202
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2203
|
+
* {@link Email.lastErrorText}.
|
|
2204
|
+
*/
|
|
2205
|
+
setAttachmentFilename(index: number, filename: string): void
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* Allows for a certificate to be explicitly provided for decryption. When an email object is
|
|
2209
|
+
* loaded via any method, such as {@link Email.loadEml}, {@link Email.setFromMimeText},
|
|
2210
|
+
* `SetFromMimeBytes`, etc., security layers (signatures and encryption) are automatically
|
|
2211
|
+
* unwrapped. This method could be called prior to calling a method that loads the email.
|
|
2212
|
+
*
|
|
2213
|
+
* Configure the certificate before loading or unwrapping the encrypted MIME so the private key is
|
|
2214
|
+
* available at decryption time.
|
|
2215
|
+
*
|
|
2216
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2217
|
+
* {@link Email.lastErrorText}.
|
|
2218
|
+
*/
|
|
2219
|
+
setDecryptCert(cert: Cert): void
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
* Explicitly provides the certificate in `cert` and the corresponding private key in `key` for
|
|
2223
|
+
* decryption. When an email object is loaded by a method such as {@link Email.loadEml}, {@link
|
|
2224
|
+
* Email.setFromMimeText}, or `SetFromMimeBytes`, security layers such as signatures and
|
|
2225
|
+
* encryption are automatically unwrapped. Decryption requires the private key in `key`.
|
|
2226
|
+
*
|
|
2227
|
+
* On Windows, Chilkat automatically searches the system certificate stores for the required
|
|
2228
|
+
* certificate and private key. On macOS, Chilkat automatically searches the Keychain. When the
|
|
2229
|
+
* required certificate and private key are not installed in one of these locations, provide them
|
|
2230
|
+
* in `cert` and `key`, or call {@link Email.addPfxSourceFile} or `AddPfxSourceData`.
|
|
2231
|
+
*
|
|
2232
|
+
* Call this method before loading or unwrapping the encrypted MIME. `cert` and `key` must
|
|
2233
|
+
* correspond to one another.
|
|
2234
|
+
*
|
|
2235
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2236
|
+
* {@link Email.lastErrorText}.
|
|
2237
|
+
*/
|
|
2238
|
+
setDecryptCert2(cert: Cert, key: PrivateKey): void
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* Sets the `Date` header field of the email to have the value of the date/time object provided.
|
|
2242
|
+
*
|
|
2243
|
+
* The date/time is formatted as an RFC822 `Date` header when the message is serialized.
|
|
2244
|
+
*
|
|
2245
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2246
|
+
* {@link Email.lastErrorText}.
|
|
2247
|
+
*/
|
|
2248
|
+
setDt(dt: CkDateTime): void
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* Creates a typical email used to send EDIFACT messages. Does the following:
|
|
2252
|
+
*
|
|
2253
|
+
* - Sets the email body to the EDIFACT message passed in `message`.
|
|
2254
|
+
*
|
|
2255
|
+
* - Sets the `Content-Transfer-Encoding` to Base64.
|
|
2256
|
+
*
|
|
2257
|
+
* - Set the `Content-Type` equal to `application/EDIFACT`.
|
|
2258
|
+
*
|
|
2259
|
+
* - Sets the `Content-Type` header's name attribute to `name`.
|
|
2260
|
+
*
|
|
2261
|
+
* - Sets the `Content-Disposition` equal to `attachment`.
|
|
2262
|
+
*
|
|
2263
|
+
* - Sets the `Content-Disposition`'s `filename` attribute equal to `filename`.
|
|
2264
|
+
*
|
|
2265
|
+
* - The EDIFACT message is converted to the charset indicated by `charset`, and encoded using
|
|
2266
|
+
* Base64 in the email body.
|
|
2267
|
+
*
|
|
2268
|
+
* The email's subject, recipients, FROM address, and other headers are left unmodified.
|
|
2269
|
+
*
|
|
2270
|
+
* This is a convenience method that constructs the customary MIME headers and body for EDIFACT
|
|
2271
|
+
* transport. It replaces the existing main body configuration.
|
|
2272
|
+
*/
|
|
2273
|
+
setEdifactBody(message: string, name: string, filename: string, charset: string): void
|
|
2274
|
+
|
|
2275
|
+
/**
|
|
2276
|
+
* Sets the certificate in `cert` as the explicit recipient encryption certificate. Use the
|
|
2277
|
+
* `CreateCS`, `CertStore`, and `Cert` classes to obtain a `Cert` object by locating a certificate
|
|
2278
|
+
* in a certificate store or loading one from a file.
|
|
2279
|
+
*
|
|
2280
|
+
* Use {@link Email.addEncryptCert} instead when the message must be decryptable by multiple
|
|
2281
|
+
* recipients.
|
|
2282
|
+
*
|
|
2283
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2284
|
+
* {@link Email.lastErrorText}.
|
|
2285
|
+
*/
|
|
2286
|
+
setEncryptCert(cert: Cert): void
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* Loads the email from MIME text contained in `mimeText`, such as the contents of an `.eml` file.
|
|
2290
|
+
*
|
|
2291
|
+
* On success, this replaces the entire current email, including recipients, headers, bodies,
|
|
2292
|
+
* related items, and attachments. An empty string is accepted and clears the current message
|
|
2293
|
+
* content.
|
|
2294
|
+
*
|
|
2295
|
+
* `mimeText` must be interpreted as MIME, not as body text. To set a plain-text body directly,
|
|
2296
|
+
* use the {@link Email.body} property or {@link Email.setTextBody}.
|
|
2297
|
+
*
|
|
2298
|
+
* This parses MIME already present in memory and does not contact a mail server.
|
|
2299
|
+
*
|
|
2300
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2301
|
+
* {@link Email.lastErrorText}.
|
|
2302
|
+
*/
|
|
2303
|
+
setFromMimeText(mimeText: string): void
|
|
2304
|
+
|
|
2305
|
+
/**
|
|
2306
|
+
* Loads an email from an XML string.
|
|
2307
|
+
*
|
|
2308
|
+
* **Note:** This replaces the entire contents of the email object, including the To/CC
|
|
2309
|
+
* recipients.
|
|
2310
|
+
*
|
|
2311
|
+
* The XML must be in Chilkat's email serialization format, typically obtained from {@link
|
|
2312
|
+
* Email.getXml}.
|
|
2313
|
+
*
|
|
2314
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2315
|
+
* {@link Email.lastErrorText}.
|
|
2316
|
+
*/
|
|
2317
|
+
setFromXmlText(xmlStr: string): void
|
|
2318
|
+
|
|
2319
|
+
/**
|
|
2320
|
+
* Sets the HTML body of an email.
|
|
2321
|
+
*
|
|
2322
|
+
* This creates or replaces the `text/html` body. It does not automatically create a plain-text
|
|
2323
|
+
* alternative.
|
|
2324
|
+
*/
|
|
2325
|
+
setHtmlBody(html: string): void
|
|
2326
|
+
|
|
2327
|
+
/**
|
|
2328
|
+
* Sets the filename for a related item within the email.
|
|
2329
|
+
*
|
|
2330
|
+
* `index` is zero-based. This changes the filename stored in the related MIME part and does not
|
|
2331
|
+
* rename a local source file.
|
|
2332
|
+
*
|
|
2333
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2334
|
+
* {@link Email.lastErrorText}.
|
|
2335
|
+
*/
|
|
2336
|
+
setRelatedFilename(index: number, path: string): void
|
|
2337
|
+
|
|
2338
|
+
/**
|
|
2339
|
+
* Defines a mail-merge replacement pair. `pattern` contains the pattern to find, and
|
|
2340
|
+
* `replaceString` contains the replacement text.
|
|
2341
|
+
*
|
|
2342
|
+
* When the email is sent by a `MailMan` sending method, occurrences of `pattern` are replaced
|
|
2343
|
+
* with `replaceString`. To define multiple replacement pairs, call this method once for each
|
|
2344
|
+
* pair. The `MailMan` method `RenderToMime` also performs these replacements. Methods such as
|
|
2345
|
+
* {@link Email.saveEml} and {@link Email.getMime} do not.
|
|
2346
|
+
*
|
|
2347
|
+
* `pattern` may occur in any header field and in either an HTML or plain-text body. Defining the
|
|
2348
|
+
* pair does not immediately alter the stored body or headers; replacement occurs later during
|
|
2349
|
+
* supported rendering or sending operations.
|
|
2350
|
+
*
|
|
2351
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2352
|
+
* {@link Email.lastErrorText}.
|
|
2353
|
+
*/
|
|
2354
|
+
setReplacePattern(pattern: string, replaceString: string): void
|
|
2355
|
+
|
|
2356
|
+
/**
|
|
2357
|
+
* Sets the certificate in `cert` for creating a digital signature. Use the `CreateCS`,
|
|
2358
|
+
* `CertStore`, and `Cert` classes to obtain a `Cert` object by locating a certificate in a
|
|
2359
|
+
* certificate store or loading one from a file.
|
|
2360
|
+
*
|
|
2361
|
+
* `cert` must have access to its private key when signing occurs. Use {@link
|
|
2362
|
+
* Email.setSigningCert2} when the private key is supplied separately.
|
|
2363
|
+
*
|
|
2364
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2365
|
+
* {@link Email.lastErrorText}.
|
|
2366
|
+
*/
|
|
2367
|
+
setSigningCert(cert: Cert): void
|
|
2368
|
+
|
|
2369
|
+
/**
|
|
2370
|
+
* Explicitly sets the certificate in `cert` and the corresponding private key in `key` for
|
|
2371
|
+
* sending digitally signed email.
|
|
2372
|
+
*
|
|
2373
|
+
* If `cert` already has access to its private key, it is usually sufficient to call {@link
|
|
2374
|
+
* Email.setSigningCert}. On Windows, Chilkat automatically searches the system certificate stores
|
|
2375
|
+
* and Windows Protected Store for the corresponding certificate and private key. On macOS,
|
|
2376
|
+
* Chilkat automatically searches the Keychain.
|
|
2377
|
+
*
|
|
2378
|
+
* In many cases, it is not necessary to set the signing certificate explicitly. Chilkat can
|
|
2379
|
+
* automatically locate a certificate whose email address matches the email's `From` address,
|
|
2380
|
+
* provided the certificate and private key are installed in a searchable certificate store or
|
|
2381
|
+
* Keychain.
|
|
2382
|
+
*
|
|
2383
|
+
* Use this method when the private key is held separately from the certificate. `cert` and `key`
|
|
2384
|
+
* must correspond to one another.
|
|
2385
|
+
*
|
|
2386
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2387
|
+
* {@link Email.lastErrorText}.
|
|
2388
|
+
*/
|
|
2389
|
+
setSigningCert2(cert: Cert, key: PrivateKey): void
|
|
2390
|
+
|
|
2391
|
+
/**
|
|
2392
|
+
* Sets the body of the email and also sets the `Content-Type` header field of `contentType`. If
|
|
2393
|
+
* the email is already multipart/alternative, an additional alternative with the indicated
|
|
2394
|
+
* `Content-Type` will be added. If an alternative with the same `Content-Type` already exists, it
|
|
2395
|
+
* is replaced.
|
|
2396
|
+
*
|
|
2397
|
+
* Use a textual MIME type such as `text/plain` or `text/html`. When building a plain-text/HTML
|
|
2398
|
+
* pair, the dedicated alternative-body methods make the intended `multipart/alternative`
|
|
2399
|
+
* structure clearer.
|
|
2400
|
+
*/
|
|
2401
|
+
setTextBody(bodyText: string, contentType: string): void
|
|
2402
|
+
|
|
2403
|
+
/**
|
|
2404
|
+
* Returns `true` if this email's UIDL equals the UIDL of the email passed in `e`.
|
|
2405
|
+
*
|
|
2406
|
+
* This comparison is meaningful for messages obtained through POP3. It does not compare IMAP
|
|
2407
|
+
* UIDs, MIME `Message-ID` values, or message content.
|
|
2408
|
+
*/
|
|
2409
|
+
uidlEquals(e: Email): boolean
|
|
2410
|
+
|
|
2411
|
+
/**
|
|
2412
|
+
* Unobfuscates emails by undoing what spammers do to obfuscate email. It removes comments from
|
|
2413
|
+
* HTML bodies and unobfuscates hyperlinked URLs.
|
|
2414
|
+
*
|
|
2415
|
+
* This modifies the current email content. Make a copy first when the original HTML must be
|
|
2416
|
+
* preserved for forensic or auditing purposes.
|
|
2417
|
+
*/
|
|
2418
|
+
unSpamify(): void
|
|
2419
|
+
|
|
2420
|
+
/**
|
|
2421
|
+
* Unpacks an HTML email into an HTML file and separate related files, such as images and style
|
|
2422
|
+
* sheets. Links in the HTML are rewritten to reference the extracted files.
|
|
2423
|
+
*
|
|
2424
|
+
* `unpackDir` specifies the destination directory for the HTML file, `htmlFilename` specifies the
|
|
2425
|
+
* HTML filename, and `partsSubdir` specifies the subdirectory beneath `unpackDir` where related
|
|
2426
|
+
* files are written. Chilkat creates the related-files subdirectory when necessary.
|
|
2427
|
+
*
|
|
2428
|
+
* **Example:** If `unpackDir` is `C:/test`, `htmlFilename` is `myEmail.html`, and `partsSubdir`
|
|
2429
|
+
* is `images`, Chilkat writes `C:/test/myEmail.html` and stores related files in
|
|
2430
|
+
* `C:/test/images`.
|
|
2431
|
+
*
|
|
2432
|
+
* **Note:** Only related content physically contained in the email can be extracted. Images
|
|
2433
|
+
* referenced by external web URLs are not downloaded.
|
|
2434
|
+
*
|
|
2435
|
+
* The extracted filenames originate from message content and should be treated as untrusted when
|
|
2436
|
+
* processing email from unknown senders. The method operates on data already present in the email
|
|
2437
|
+
* object.
|
|
2438
|
+
*
|
|
2439
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2440
|
+
* {@link Email.lastErrorText}.
|
|
2441
|
+
*/
|
|
2442
|
+
unpackHtml(unpackDir: string, htmlFilename: string, partsSubdir: string): void
|
|
2443
|
+
|
|
2444
|
+
/**
|
|
2445
|
+
* Unzips and replaces any Zip file attachments with the expanded contents. As an example, if an
|
|
2446
|
+
* email contained a single Zip file containing 3 GIF image files as an attachment, then after
|
|
2447
|
+
* calling this method the email would contain 3 GIF file attachments, and the Zip attachment
|
|
2448
|
+
* would be gone.If an email contains multiple Zip file attachments, each Zip is expanded and
|
|
2449
|
+
* replaced with the contents.
|
|
2450
|
+
*
|
|
2451
|
+
* This changes the attachment collection in memory; it does not extract files directly to a
|
|
2452
|
+
* filesystem directory. Save the resulting attachments separately when files are required on
|
|
2453
|
+
* disk.
|
|
2454
|
+
*
|
|
2455
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2456
|
+
* {@link Email.lastErrorText}.
|
|
2457
|
+
*/
|
|
2458
|
+
unzipAttachments(): void
|
|
2459
|
+
|
|
2460
|
+
/**
|
|
2461
|
+
* Adds the XML certificate vault in `vault` to the object's internal certificate and private-key
|
|
2462
|
+
* lookup sources for encryption, decryption, signing, and verification.
|
|
2463
|
+
*
|
|
2464
|
+
* Unlike `AddPfxSourceData` and {@link Email.addPfxSourceFile}, only one XML certificate vault
|
|
2465
|
+
* can be used. Each call replaces the vault supplied by the previous call, so only the most
|
|
2466
|
+
* recent `vault` remains in use.
|
|
2467
|
+
*
|
|
2468
|
+
* `vault` becomes a lookup source for subsequent operations by this object. Adding it does not
|
|
2469
|
+
* immediately sign, verify, encrypt, or decrypt anything.
|
|
2470
|
+
*
|
|
2471
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2472
|
+
* {@link Email.lastErrorText}.
|
|
2473
|
+
*/
|
|
2474
|
+
useCertVault(vault: XmlCertVault): void
|
|
2475
|
+
|
|
2476
|
+
/**
|
|
2477
|
+
* Replaces all the attachments of an email with a single Zip file attachment having the filename
|
|
2478
|
+
* specified.
|
|
2479
|
+
*
|
|
2480
|
+
* The original attachments are removed from the in-memory email and their contents are placed
|
|
2481
|
+
* into the new Zip attachment. Related items and attached emails are separate.
|
|
2482
|
+
*
|
|
2483
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2484
|
+
* {@link Email.lastErrorText}.
|
|
2485
|
+
*/
|
|
2486
|
+
zipAttachments(zipFilename: string): void
|
|
2487
|
+
|
|
2488
|
+
/**
|
|
2489
|
+
* Computes a global unique key for the email. The key is created by a digest-MD5 hash of the
|
|
2490
|
+
* concatenation of the following:
|
|
2491
|
+
*
|
|
2492
|
+
* ```
|
|
2493
|
+
* messageID + CRLF + subject + CRLF + from + CRLF + date + CRLF + recipientAddrs
|
|
2494
|
+
*
|
|
2495
|
+
* messageID contains the contents of the Message-ID header field.
|
|
2496
|
+
* subject contains the contents of the Subject header field, trimmed of whitespace from both ends,
|
|
2497
|
+
* where TAB characters are converted to SPACE characters, and internal whitespace is trimmed so that
|
|
2498
|
+
* no more than one SPACE char in a row exists.
|
|
2499
|
+
* from contains the lowercase From header email address.
|
|
2500
|
+
* date contains the contents of the Date header field.
|
|
2501
|
+
* toAddrs contains lowercase To and Cc recipient email addresses, comma-separated, with duplicates removed, and sorted
|
|
2502
|
+
* in ascending order. The BCC addresses are NOT included.
|
|
2503
|
+
*
|
|
2504
|
+
* (After calling this method, the LastErrorText property can be examined to see the string that was hashed.)
|
|
2505
|
+
* ```
|
|
2506
|
+
*
|
|
2507
|
+
* The 16-byte MD5 hash is returned as an encoded string. `encoding` determines the encoding:
|
|
2508
|
+
* base64, hex, url, etc. If `bFold` is `true`, then the 16-byte MD5 hash is folded to 8 bytes
|
|
2509
|
+
* with an XOR to produce a shorter key.
|
|
2510
|
+
*
|
|
2511
|
+
* The result is intended as a deterministic message key for indexing or duplicate detection. It
|
|
2512
|
+
* is separate from the MIME `Message-ID` and does not modify the email.
|
|
2513
|
+
*
|
|
2514
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2515
|
+
* {@link Email.lastErrorText}.
|
|
2516
|
+
*/
|
|
2517
|
+
computeGlobalKey2(encoding: string, bFold: boolean): string
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* Returns the email as MIME text containing the email header, body (or bodies), related items (if
|
|
2521
|
+
* any), and all attachments. The MIME is appended to the existing contents (if any) of `sb`.
|
|
2522
|
+
*
|
|
2523
|
+
* Clear `sb` first when replacement rather than append behavior is desired.
|
|
2524
|
+
*
|
|
2525
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2526
|
+
* {@link Email.lastErrorText}.
|
|
2527
|
+
*/
|
|
2528
|
+
getMimeSb(sb: StringBuilder): void
|
|
2529
|
+
|
|
2530
|
+
/**
|
|
2531
|
+
* Serializes the complete RFC822/MIME message and appends the bytes to `bindat`.
|
|
2532
|
+
*
|
|
2533
|
+
* The output includes headers, body representations, related items, and attachments. Clear
|
|
2534
|
+
* `bindat` first when replacement rather than append behavior is desired.
|
|
2535
|
+
*
|
|
2536
|
+
* Serialization may normalize header whitespace, `Content-Type` parameters, transfer encodings,
|
|
2537
|
+
* and other MIME formatting. Loading MIME and then calling this method is therefore not
|
|
2538
|
+
* guaranteed to reproduce the original input byte-for-byte.
|
|
2539
|
+
*
|
|
2540
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2541
|
+
* {@link Email.lastErrorText}.
|
|
2542
|
+
*/
|
|
2543
|
+
getMimeBd(bindat: BinData): void
|
|
2544
|
+
|
|
2545
|
+
/**
|
|
2546
|
+
* Loads an email with the MIME stored in a `StringBuilder` object.
|
|
2547
|
+
*
|
|
2548
|
+
* **Note:** This replaces the entire contents of the email object, including the To/CC
|
|
2549
|
+
* recipients.
|
|
2550
|
+
*
|
|
2551
|
+
* The MIME is parsed locally and the `StringBuilder` itself is not modified.
|
|
2552
|
+
*
|
|
2553
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2554
|
+
* {@link Email.lastErrorText}.
|
|
2555
|
+
*/
|
|
2556
|
+
setFromMimeSb(sb: StringBuilder): void
|
|
2557
|
+
|
|
2558
|
+
/**
|
|
2559
|
+
* Loads an email with the MIME stored in a `BinData` object.
|
|
2560
|
+
*
|
|
2561
|
+
* **Note:** This replaces the entire contents of the email object, including the To/CC
|
|
2562
|
+
* recipients.
|
|
2563
|
+
*
|
|
2564
|
+
* The MIME is parsed locally and the `BinData` itself is not modified.
|
|
2565
|
+
*
|
|
2566
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2567
|
+
* {@link Email.lastErrorText}.
|
|
2568
|
+
*/
|
|
2569
|
+
setFromMimeBd(bindat: BinData): void
|
|
2570
|
+
|
|
2571
|
+
/**
|
|
2572
|
+
* Adds an attachment using the contents of a `BinData` object. If `contentType` is empty, then
|
|
2573
|
+
* the `Content-Type` will be inferred from `filename` extension.
|
|
2574
|
+
*
|
|
2575
|
+
* `filename` is the filename stored in MIME, not a filesystem path. The bytes are taken from
|
|
2576
|
+
* `binData`.
|
|
2577
|
+
*
|
|
2578
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2579
|
+
* {@link Email.lastErrorText}.
|
|
2580
|
+
*/
|
|
2581
|
+
addAttachmentBd(filename: string, binData: BinData, contentType: string): void
|
|
2582
|
+
|
|
2583
|
+
/**
|
|
2584
|
+
* Adds a related item using the contents of a `BinData` object. Returns the `Content-ID` for the
|
|
2585
|
+
* newly added related item.
|
|
2586
|
+
*
|
|
2587
|
+
* The returned `Content-ID` can be used in the HTML body as `cid:returnedContentId`.
|
|
2588
|
+
*
|
|
2589
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2590
|
+
* {@link Email.lastErrorText}.
|
|
2591
|
+
*/
|
|
2592
|
+
addRelatedBd(filename: string, binData: BinData): string
|
|
2593
|
+
|
|
2594
|
+
/**
|
|
2595
|
+
* Adds a related item using the binary data in `binData`.
|
|
2596
|
+
*
|
|
2597
|
+
* `fileNameInHtml` specifies the filename, path, or URL used by the corresponding HTML reference,
|
|
2598
|
+
* such as an `img` element's `src` attribute.
|
|
2599
|
+
*
|
|
2600
|
+
* This form is useful when the HTML already contains a filename, URL, or path reference that
|
|
2601
|
+
* Chilkat should associate with the new related MIME part.
|
|
2602
|
+
*
|
|
2603
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2604
|
+
* {@link Email.lastErrorText}.
|
|
2605
|
+
*/
|
|
2606
|
+
addRelatedBd2(binData: BinData, fileNameInHtml: string): void
|
|
2607
|
+
|
|
2608
|
+
/**
|
|
2609
|
+
* Copies an attachment's binary data into `binData`. The first attachment is at index 0.
|
|
2610
|
+
*
|
|
2611
|
+
* `index` is zero-based. `binData` receives the attachment bytes.
|
|
2612
|
+
*
|
|
2613
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2614
|
+
* {@link Email.lastErrorText}.
|
|
2615
|
+
*/
|
|
2616
|
+
getAttachmentBd(index: number, binData: BinData): void
|
|
2617
|
+
|
|
2618
|
+
/**
|
|
2619
|
+
* Returns the contents of the Nth alternative body to `binData`. The first alternative body is at
|
|
2620
|
+
* index 0. This method should only be called when the {@link Email.numAlternatives} property has
|
|
2621
|
+
* a value greater than 0.
|
|
2622
|
+
*
|
|
2623
|
+
* `index` is zero-based; valid values are from `0` through `1 - 1`. `binData` receives the body
|
|
2624
|
+
* bytes.
|
|
2625
|
+
*
|
|
2626
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2627
|
+
* {@link Email.lastErrorText}.
|
|
2628
|
+
*/
|
|
2629
|
+
getAlternativeBodyBd(index: number, binData: BinData): void
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* Repairs selected MIME-formatting problems commonly found in email produced by other software.
|
|
2633
|
+
*
|
|
2634
|
+
* `fixups` is a comma-separated list of fixup keywords. The following keyword is currently
|
|
2635
|
+
* defined:
|
|
2636
|
+
*
|
|
2637
|
+
* - `FixRelated` — Relocates HTML-related items, such as embedded images, into the appropriate
|
|
2638
|
+
* MIME structure so they are not incorrectly presented as ordinary attachments.
|
|
2639
|
+
*
|
|
2640
|
+
* Fixups modify the current in-memory MIME structure. Apply them only when the input message
|
|
2641
|
+
* exhibits the corresponding formatting problem.
|
|
2642
|
+
*
|
|
2643
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2644
|
+
* {@link Email.lastErrorText}.
|
|
2645
|
+
*/
|
|
2646
|
+
applyFixups(fixups: string): void
|
|
2647
|
+
|
|
2648
|
+
/**
|
|
2649
|
+
* Removes the current message content, including recipients, headers, body representations,
|
|
2650
|
+
* attachments, related items, and embedded messages. It does not delete or alter a message on a
|
|
2651
|
+
* mail server.
|
|
2652
|
+
*
|
|
2653
|
+
* This method does not reset every configurable property. It resets message-oriented state such
|
|
2654
|
+
* as {@link Email.charset}, {@link Email.sendSigned}, {@link Email.sendEncrypted}, {@link
|
|
2655
|
+
* Email.overwriteExisting}, and {@link Email.returnReceipt} to their defaults.
|
|
2656
|
+
*
|
|
2657
|
+
* Other settings remain unchanged. In particular, replacement patterns and settings such as
|
|
2658
|
+
* {@link Email.signingHashAlg}, {@link Email.pkcs7KeyLength}, {@link Email.oaepMgfHash}, {@link
|
|
2659
|
+
* Email.prependHeaders}, and {@link Email.uncommonOptions} are preserved.
|
|
2660
|
+
*
|
|
2661
|
+
* After clearing, the email has one default empty text body. When serialized, Chilkat can emit
|
|
2662
|
+
* the standard headers for an empty email.
|
|
2663
|
+
*/
|
|
2664
|
+
clear(): void
|
|
2665
|
+
|
|
2666
|
+
/**
|
|
2667
|
+
* Converts images embedded inline within HTML to multipart/related MIME parts referenced from the
|
|
2668
|
+
* HTML by CID.
|
|
2669
|
+
*
|
|
2670
|
+
* This is useful for producing conventional HTML email where image data is stored in MIME parts
|
|
2671
|
+
* rather than directly in the HTML. Review the resulting HTML and related-item collection after
|
|
2672
|
+
* conversion.
|
|
2673
|
+
*
|
|
2674
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2675
|
+
* {@link Email.lastErrorText}.
|
|
2676
|
+
*/
|
|
2677
|
+
convertInlineImages(): void
|
|
2678
|
+
|
|
2679
|
+
/**
|
|
2680
|
+
* Attaches a copy of `email` to this email object. The attached email is encapsulated in a
|
|
2681
|
+
* `message/rfc822` subpart.
|
|
2682
|
+
*
|
|
2683
|
+
* A copy is attached, so later changes to `email` do not change the embedded message. The new
|
|
2684
|
+
* part is counted by {@link Email.numAttachedMessages}.
|
|
2685
|
+
*
|
|
2686
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2687
|
+
* {@link Email.lastErrorText}.
|
|
2688
|
+
*/
|
|
2689
|
+
attachEmail(email: Email): void
|
|
2690
|
+
|
|
2691
|
+
/**
|
|
2692
|
+
* Returns the `Content-Type` of the Nth non-multipart MIME part matching the pattern in
|
|
2693
|
+
* `contentType`. `index` is a zero-based index among the matching parts.
|
|
2694
|
+
*
|
|
2695
|
+
* `contentType` may be an exact `Content-Type`, such as `text/plain`, or a wildcard pattern, such
|
|
2696
|
+
* as `text/*` or `*`. When `inlineOnly` is `true`, only parts having an `inline`
|
|
2697
|
+
* `Content-Disposition` are considered. When `excludeAttachments` is `true`, parts having an
|
|
2698
|
+
* `attachment` `Content-Disposition` are excluded.
|
|
2699
|
+
*
|
|
2700
|
+
* Use {@link Email.getNumPartsOfType} with the same filters to determine the valid zero-based
|
|
2701
|
+
* index range.
|
|
2702
|
+
*
|
|
2703
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2704
|
+
* {@link Email.lastErrorText}.
|
|
2705
|
+
*/
|
|
2706
|
+
getNthContentType(index: number, contentType: string, inlineOnly: boolean, excludeAttachments: boolean): string
|
|
2707
|
+
|
|
2708
|
+
/**
|
|
2709
|
+
* Loads `bd` with the binary bytes of the Nth MIME sub-part matching `contentType`, which can be
|
|
2710
|
+
* an exact `Content-Type` such as `application/pdf`, or a wildcarded `Content-Type` such as
|
|
2711
|
+
* `application/*`, or `*\/*`. Indexing begins at 0. Call {@link Email.getNumPartsOfType} to find
|
|
2712
|
+
* out how many MIME sub-parts exist for any given content type. If `inlineOnly` is `true`, then
|
|
2713
|
+
* only MIME sub-parts having a `Content-Disposition` of `inline` are included. If
|
|
2714
|
+
* `excludeAttachments` is `true`, then MIME sub-parts having a `Content-Disposition` of
|
|
2715
|
+
* `attachment` are excluded.
|
|
2716
|
+
*
|
|
2717
|
+
* **Note:** If the email was downloaded as header-only, it will not contain all the parts of the
|
|
2718
|
+
* full email. Also, if downloaded from IMAP excluding attachments, those parts that are the
|
|
2719
|
+
* attachments will (of course) be missing.
|
|
2720
|
+
*
|
|
2721
|
+
* **Note:** Beginning in v9.5.0.95, `contentType` can be wildcarded. For example, it is possible
|
|
2722
|
+
* to specify `text/*`, or simply `*` to match any `Content-Type`.
|
|
2723
|
+
*
|
|
2724
|
+
* **Note:** Only non-multipart MIME parts are matched.
|
|
2725
|
+
*
|
|
2726
|
+
* Use {@link Email.getNumPartsOfType} with the same filters to determine the valid zero-based
|
|
2727
|
+
* index range before loading `bd`.
|
|
2728
|
+
*
|
|
2729
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2730
|
+
* {@link Email.lastErrorText}.
|
|
2731
|
+
*/
|
|
2732
|
+
getNthBinaryPartOfTypeBd(index: number, contentType: string, inlineOnly: boolean, excludeAttachments: boolean, bd: BinData): void
|
|
2733
|
+
|
|
2734
|
+
/**
|
|
2735
|
+
* Returns the value of a header field (by name) of a related item.
|
|
2736
|
+
*
|
|
2737
|
+
* `index` is a zero-based related-item index. MIME header-field names are case-insensitive.
|
|
2738
|
+
*
|
|
2739
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2740
|
+
* {@link Email.lastErrorText}.
|
|
2741
|
+
*/
|
|
2742
|
+
getRelatedHeader(index: number, fieldName: string): string
|
|
2743
|
+
|
|
2744
|
+
/**
|
|
2745
|
+
* Returns the body having the `text/html` content type. If `inlineImageData` is `true`, the
|
|
2746
|
+
* related images found in the MIME are inlined as base64 directly within the returned HTML. The
|
|
2747
|
+
* HTML is returned in `sb`.
|
|
2748
|
+
*
|
|
2749
|
+
* Inlining related images can substantially increase the size of the returned HTML because the
|
|
2750
|
+
* image bytes are embedded as data URLs.
|
|
2751
|
+
*
|
|
2752
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2753
|
+
* {@link Email.lastErrorText}.
|
|
2754
|
+
*/
|
|
2755
|
+
getHtmlBodySb(inlineImageData: boolean, sb: StringBuilder): void
|
|
2756
|
+
|
|
2757
|
+
/**
|
|
2758
|
+
* Returns in `cert` the certificate used to decrypt this email.
|
|
2759
|
+
*
|
|
2760
|
+
* Call this after a successful decryption to inspect the certificate associated with the private
|
|
2761
|
+
* key that decrypted the message.
|
|
2762
|
+
*
|
|
2763
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2764
|
+
* {@link Email.lastErrorText}.
|
|
2765
|
+
*/
|
|
2766
|
+
lastDecryptCert(cert: Cert): void
|
|
2767
|
+
|
|
2768
|
+
/**
|
|
2769
|
+
* Copies the certificate for the signer at the zero-based index specified by `index` into `cert`.
|
|
2770
|
+
*
|
|
2771
|
+
* Most signed emails have one signer, but an email may contain multiple signatures.
|
|
2772
|
+
*
|
|
2773
|
+
* Call this after parsing or verifying a signed message. `cert` receives a copy of the signer
|
|
2774
|
+
* certificate and can be examined independently.
|
|
2775
|
+
*
|
|
2776
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2777
|
+
* {@link Email.lastErrorText}.
|
|
2778
|
+
*/
|
|
2779
|
+
lastSignerCert(index: number, cert: Cert): void
|
|
2780
|
+
|
|
2781
|
+
/**
|
|
2782
|
+
* Copies the entire state of this email into `destEmail`, including all message content,
|
|
2783
|
+
* recipients, headers, body representations, attachments, related items, embedded messages,
|
|
2784
|
+
* replacement patterns, certificates, certificate sources, and configuration properties.
|
|
2785
|
+
*
|
|
2786
|
+
* `destEmail` becomes an independent copy. Subsequent changes to either email object do not
|
|
2787
|
+
* affect the other.
|
|
2788
|
+
*
|
|
2789
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2790
|
+
* {@link Email.lastErrorText}.
|
|
2791
|
+
*/
|
|
2792
|
+
makeCopy(destEmail: Email): void
|
|
2793
|
+
|
|
2794
|
+
/**
|
|
2795
|
+
* Creates a new Delivery Status Notification (DSN) email in the format specified by RFC 3464. The
|
|
2796
|
+
* DSN email is generated in `dsnEmail`.
|
|
2797
|
+
*
|
|
2798
|
+
* The source email is not modified. Populate any additional sender or recipient fields on
|
|
2799
|
+
* `dsnEmail` before sending the generated notification.
|
|
2800
|
+
*
|
|
2801
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2802
|
+
* {@link Email.lastErrorText}.
|
|
2803
|
+
*/
|
|
2804
|
+
toDsn(explanation: string, statusFields: string, headerOnly: boolean, dsnEmail: Email): void
|
|
2805
|
+
|
|
2806
|
+
/**
|
|
2807
|
+
* Creates an inline-forward email in `fwdEmail` based on this email.
|
|
2808
|
+
*
|
|
2809
|
+
* The source email is not modified. `fwdEmail` can be edited to add recipients, introductory
|
|
2810
|
+
* text, or other forwarding details before sending.
|
|
2811
|
+
*
|
|
2812
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2813
|
+
* {@link Email.lastErrorText}.
|
|
2814
|
+
*/
|
|
2815
|
+
toForward(fwdEmail: Email): void
|
|
2816
|
+
|
|
2817
|
+
/**
|
|
2818
|
+
* Creates a new MDN (Message Disposition Notification) email in `mdn` using the format specified
|
|
2819
|
+
* by RFC 3798.
|
|
2820
|
+
*
|
|
2821
|
+
* The source email is not modified. Populate any additional sender or recipient fields on `mdn`
|
|
2822
|
+
* before sending the generated notification.
|
|
2823
|
+
*
|
|
2824
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2825
|
+
* {@link Email.lastErrorText}.
|
|
2826
|
+
*/
|
|
2827
|
+
toMdn(message: string, statusFields: string, headerOnly: boolean, mdn: Email): void
|
|
2828
|
+
|
|
2829
|
+
/**
|
|
2830
|
+
* Generates a reply email in `reply` with updated header and body fields to enable sending as a
|
|
2831
|
+
* reply. Note: Attachments are excluded from the reply, but attached messages are included. To
|
|
2832
|
+
* exclude attached messages, call {@link Email.removeAttachedMessages} on the reply email object.
|
|
2833
|
+
*
|
|
2834
|
+
* The source email is not modified. `reply` can be edited to add introductory text, adjust
|
|
2835
|
+
* recipients, or change reply behavior before sending.
|
|
2836
|
+
*
|
|
2837
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2838
|
+
* {@link Email.lastErrorText}.
|
|
2839
|
+
*/
|
|
2840
|
+
toReply(reply: Email): void
|
|
2841
|
+
|
|
2842
|
+
/**
|
|
2843
|
+
* Copies the Nth embedded `message/rfc822` MIME part into `email`.
|
|
2844
|
+
*
|
|
2845
|
+
* `index` is zero-based; valid values are from `0` through `0 - 1`. `email` is replaced with an
|
|
2846
|
+
* independent copy of the embedded message. Modifying `email` does not change the embedded
|
|
2847
|
+
* message stored in the caller.
|
|
2848
|
+
*
|
|
2849
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2850
|
+
* {@link Email.lastErrorText}.
|
|
2851
|
+
*/
|
|
2852
|
+
getAttachedEmail(index: number, email: Email): void
|
|
2853
|
+
|
|
2854
|
+
/**
|
|
2855
|
+
* Returns in `email` the Nth digest email contained within a multipart/digest. The first digest
|
|
2856
|
+
* is at index 0. Use the {@link Email.numDigests} property to get the number of digests
|
|
2857
|
+
* available.
|
|
2858
|
+
*
|
|
2859
|
+
* `index` is zero-based; valid values are from `0` through `1 - 1`. `email` receives a copy of
|
|
2860
|
+
* the digest message.
|
|
2861
|
+
*
|
|
2862
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2863
|
+
* {@link Email.lastErrorText}.
|
|
2864
|
+
*/
|
|
2865
|
+
getDigestEmail(index: number, email: Email): void
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* If the {@link Email.isMultipartReport} method indicates that the email is `multipart/report`,
|
|
2869
|
+
* use this method to obtain the delivery-status information, including the final recipients, as
|
|
2870
|
+
* JSON that is easy to parse.
|
|
2871
|
+
*
|
|
2872
|
+
* The JSON is derived from report data already contained in the email; the method does not
|
|
2873
|
+
* contact an SMTP server for updated status.
|
|
2874
|
+
*
|
|
2875
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2876
|
+
* {@link Email.lastErrorText}.
|
|
2877
|
+
*/
|
|
2878
|
+
getDsnInfo(json: JsonObject): void
|
|
2879
|
+
|
|
2880
|
+
/**
|
|
2881
|
+
* Extracts domain names from hyperlinks in an HTML email. Lowercase domains are appended to
|
|
2882
|
+
* `domains` without creating duplicates.
|
|
2883
|
+
*
|
|
2884
|
+
* This method parses links only; it does not perform DNS lookups or make network requests to the
|
|
2885
|
+
* extracted domains.
|
|
2886
|
+
*
|
|
2887
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2888
|
+
* {@link Email.lastErrorText}.
|
|
2889
|
+
*/
|
|
2890
|
+
linkedDomains(domains: StringTable): void
|
|
2891
|
+
|
|
2892
|
+
/**
|
|
2893
|
+
* Adds the PFX data in `bd` to the list of certificate and private-key sources used during
|
|
2894
|
+
* decryption or signing. `password` contains the PFX password.
|
|
2895
|
+
*
|
|
2896
|
+
* Call this method once for each additional PFX source.
|
|
2897
|
+
*
|
|
2898
|
+
* The PFX data becomes a lookup source for subsequent cryptographic operations by this object.
|
|
2899
|
+
* Adding it does not immediately decrypt or sign the message.
|
|
2900
|
+
*
|
|
2901
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2902
|
+
* {@link Email.lastErrorText}.
|
|
2903
|
+
*/
|
|
2904
|
+
addPfxSourceBd(bd: BinData, password: string): void
|
|
2905
|
+
|
|
2906
|
+
/**
|
|
2907
|
+
* Sets the main email body from the binary data in `bd`.
|
|
2908
|
+
*
|
|
2909
|
+
* `contentType` specifies the MIME `Content-Type`. `disposition` specifies the disposition and
|
|
2910
|
+
* may be empty, `inline`, or `attachment`. `filename` optionally specifies a filename. When
|
|
2911
|
+
* `filename` is provided, `disposition` must also be specified because the filename is an
|
|
2912
|
+
* attribute of the `Content-Disposition` header.
|
|
2913
|
+
*
|
|
2914
|
+
* This replaces the main body using bytes already stored in `bd`. It does not add a separate
|
|
2915
|
+
* attachment unless `disposition` and `filename` intentionally describe the body as one.
|
|
2916
|
+
*
|
|
2917
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
2918
|
+
* {@link Email.lastErrorText}.
|
|
2919
|
+
*/
|
|
2920
|
+
setBodyBd(bd: BinData, contentType: string, disposition: string, filename: string): void
|
|
2921
|
+
}
|