Office365 SMTP Error: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied;

Question: I’m trying to send email using SMTP via smtp.office365.com, and I get this error: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:0A001485, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:59020000, 1.36674:0E000000, 1.61250:00000000, 1.45378:5E020000, 1.44866:F8000000, 16.55847:BC030000, 17.43559:0000000024020000000000000000000000000000, 20.52176:140FFA8B1500001000000000, 20.50032:140FFA8B8517001000000000, 0.35180:F1030000, 255.23226:09000000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:F1030000, 0.35250:0300C981, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:3A000000, 1.36674:32000000, 1.61250:00000000, 1.45378:3F000000, 1.44866:01000000, 16.55847:A6000000, […]

FoxPro Debugger Combined with Async Functions

Problem: A Chilkat FoxPro programmer was calling Rest.FullRequestSbAsync with a 3MB request.  It failed with a WSAECONNABORTED error message.  However, calling Rest.FullRequestSb works fine.  Why? Answer: When the async version of a method is called, Chilkat is starting a background thread to call the synchronous version of the method.  For example, the Async method returns a Task object.  When task.Run […]

ActiveX: Permission denied (Error 70)

A Chilkat ActiveX user (in VB6) was struggling with a “Permission denied (Error 70)”. It occurred on the very first call to a Chilkat method (UnlockBundle). Solution: The solution is that the ActiveX DLL somehow did not have read + execute permissions.  The 1st access to a method in the ActiveX triggered the runtime to load the DLL, and this […]

PHP Script for Downloading, Installing, and Testing Chilkat

Here is a bash shell script for downloading, unpacking, installing, and testing the 64-bit PHP 7.4 extension for Chilkat. 1) It assumes PHP 7.4 was installed to $HOME/phps/php74. 2) This example is downloading Chilkat version 9.5.0.82 (change the wget URL to the latest version) export PATH=$HOME/phps/php74/bin:$PATH php -v cd if [ ! -d testing ]; then mkdir testing fi cd […]

Authentication Problem with Sending Email in Office365 using SMTP

If SMTP authentication (using login/password) fails for your smtp.office365.com account, then it may be that your account is configured to require MFA (multi-factor authentication).   You may need to change settings to allow for legacy authentication (single-factor auth).   See https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/block-legacy-authentication Also, an app password may be required.  See https://docs.microsoft.com/en-us/azure/active-directory/user-help/multi-factor-authentication-end-user-app-passwords    

Convert CkDateTime to Delphi TDateTime

Question: Which is the best way to convert a CkDateTime to a Delphi TDateTime? Answer: I didn’t know the answer, so I Googled “Delphi TDateTime” to see exactly what it is.  It brought me to this web page:  http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/System_TDateTime.html In Delphi, TDateTime is a type that maps to a Double. In C++, the TDateTime class corresponds to the Delphi TDateTime […]

0x80090016 – Keyset does not exist

This blog post describes one possible cause for the “Keyset does not exist” error when trying to access/use a non-exportable private key via the Microsoft CNG or CryptoAPI. The situation was that the certificate was installed to the user’s Current User Personal Store, but the corresponding private key was stored in the Local Machine Key Store (machine keyset).  There were […]

OAuth2 Request Access Token w/ Basic Authentication

Some OAuth2 token endpoints want the Client ID/Client Secret to be included using HTTP Basic Authentication. For example, we can look at the documentation for the GoToMeeting API at https://goto-developer.logmeininc.com/how-get-access-token-and-organizer-key You’ll see this under the “2 – Request Access Token”  in the GoTo API documentation linked above: curl -X POST “https://api.getgo.com/oauth/v2/token” \ -H “Authorization: Basic {Base64 Encoded consumerKey and consumerSecret}” […]

Start Browser from Client-Side PHP Script

Let’s say you have a PHP script (not PHP on a web server, but simply a .php script that you run from a command line), this is one way to start/launch a browser and automatically load/navigate to a URL. <?php // Type “start iexplore” and press “Enter” to open Internet Explorer and view its default home screen. // Alternatively, type […]