The Error 0x8007139f is a generic error code in Windows and it might occur when either opening Mail and Calendar or when trying to update your Windows OS. The reasons vary in each case, so we have separately dealt with both issues and provided 5-7 fixes each.
This bug may also appear when you are launching the Windows Security program. The underlying causes and their solutions vary for a security app. That’s the reason why we have separately written a comprehensive guide on this topic.
Fix Windows Mail Error Code 0x8007139f
If you are receiving an error code while starting the “Mail and Calendar” app, or when sending an email through it, consider applying the below fixes one by one.
1] Change the Mail Privacy Settings
You may resolve the Mail app error code 0x8007139f by simply configuring its privacy settings. Here’s how to perform this task on your Windows PC –
- Right-click on the Windows icon, and select Settings.
- Go to Privacy & Security > Email (under Permissions), and check if apps are allowed to access your email.
- If not, you may turn on the toggle switches next to “Email access” and “Let apps access your email.”
- After you turn on both these toggle switches, close the Settings app, and restart your computer.
Sign back into your device again and check if you can open the Mail app without getting an error code 0x8007139f.
2] Check if the Mail app is allowed through Windows Firewall
By default, the Mail app is allowed through Windows Firewall. There’s a possibility that you have manually restricted this app from functioning via Firewall settings. If that’s the case, you must check and allow it through Firewall again. Here’s how to perform this task –
- Press Windows + I to launch the Settings app.
- Go to Privacy & Security, and select Windows Security from the right pane.
- On the next screen, click Open Windows Security. See the Snapshot below –
- Windows Security app will launch next. Go to Firewall & network protection tab, and hit “Allow an app through firewall.”
- The system will next open the “Allowed apps” section under Control Panel.
- Click the “Change settings” button and then tick the checkboxes next to Mail and Calendar under both Private as well as Public columns.
- Click OK to confirm the recent changes and restart your computer.
If the Mail and Calendar app was indeed restricted via Firewall, the error code 0x8007139f will resolve by now. However, if it wasn’t, follow the next set of solutions.
3] Run Windows Store Apps troubleshooter
Troubleshooting Windows Store Apps is another effective way to resolve this Mail error code 0x8007139f on Windows. Follow the below instructions on how to perform this task –
- Launch Settings first by pressing Windows + I.
- When the Settings app opens up, navigate to the below path –
Settings > System > Troubleshoot > Other troubleshooters
- Scroll down to the bottom of the Other section, and locate Windows Store apps.
- When found, click the Run button available on it.
- Clicking on this Run button will invoke the troubleshooter.
- Click Next and then follow the on-screen instructions to let this tool finish repairing your Microsoft Store app.
After the troubleshooting completes, restart your computer, and check if the error code 0x8007139f resolves now.
4] Reset the Microsoft Store app
Since “Mail and Calendar” is associated with Microsoft Store, you must reset the Store app itself to resolve any issues with the Mailing app. To perform this task, all you require is to start Command Prompt as administrator, and execute the below code over it –
The moment this command runs successfully, you will find Microsoft Store up and running again. Go and check if you can use the Mail and Calendar app without any issues.
5] Uninstall and then reinstall the Mail and Calendar app
If none of the above fixes help to address this Mail error code 0x8007139f on your Windows PC, you must uninstall this system app first and then reinstall it again. Follow the below instructions on how to perform this task –
- Press Windows + X, and choose Terminal (Admin).
- When the UAC window prompts, hit Yes to authorize accessing the terminal.
- On the terminal, copy/paste the following code, and press Enter –
Get-AppxPackage Microsoft.windowscommunicationsapps | Remove-AppxPackage
- The above command will uninstall the Mail and Calendar app from your system.
- Launch Microsoft Store next, and search for the “Mail and Calendar” app there.
- When found, click the Install button.
Wait for this installation to complete and as soon as this is over, restart your computer. From the next login, hopefully, you will be able to use Mail and Calendar as usual.
Windows Update error 0x8007139f solutions
This error 0x8007139f also occurs when you are trying to install pending updates on your computer. If you are struggling with the same error code and are searching for solutions, follow the below set of solutions. Let’s explore the fixes one after another in sequential order.
1] Uninstall third-party antivirus
A third-party antivirus can do much more harm than good. For example, an external security app is known to interact with the system files and make them corrupt. If you are using some premium antivirus, then it’s okay. Otherwise, simply uninstall or at least disable a free antivirus program from your system and check if the update error code 0x8007139f resolves this way.
2] Run System File Checker & DISM tools
Even after you remove a faulty security app from your system, the files that it corrupted still lie on your system. To repair such files, one must run SFC and DISM tools. The System File Checker will diagnose and repair the system files lying at “C:\Windows\System32” while the DISM tool will repair any corruption within the System image.
Follow the below instructions on how to run both these tools on Windows 11/10 –
- Press Windows + S to launch the Search window.
- Type CMD in the text field, right-click on the top result, and select Run as administrator.
- The UAC prompt will appear next, hit Yes to authorize opening the Command Prompt.
- On the elevated console, type the following and press Enter –
- Wait for this command to run and complete 100%. After this scanning and repairing process is over, run the DISM tool by copying and pasting the below code over the same console –
DISM /Online /Cleanup-Image /RestoreHealth
- Wait again for 10-15 minutes while the DISM tool is finding and repairing any corrupt files within your system.
After this is over, restart your PC, and check if you can update Windows normally now.
3] Run Windows Update troubleshooter
If the error code 0x8007139f is still appearing, you may take the help of the troubleshooting tool. When you run this tool, it checks for the underlying causes inside your system and repairs the issues that it finds. Here’s how to proceed ahead with this task on Windows 10 –
- Press Win + I hotkey to launch the Settings app.
- Go to Update & Security thereafter Troubleshoot from the left navigation.
- Click the “Additional troubleshooter” link from the right pane.
- When this window expands, locate and click over Windows Update.
- You will next see a button – Run the troubleshooter.
- Click on this button and wait for the troubleshooter to start on your Windows 10 PC.
- When the troubleshooter launches, click Next and follow the on-screen instructions.
After this is over, I hope you were able to update your Windows OS to its next available Build version.
Note: Windows 11 users may find this setting by visiting the below path –
Settings > System > Troubleshoot > Other troubleshooters
Locate Windows Update available under “Most frequent” and hit the Run button available on it. Next, follow the on-screen guideline to resolve this error code.
4] Reset Windows Update components
The presence of corruption within the system might also result in an error code 0x8007139f when updating Windows. This mostly happens because the cache folders keep even the long outdated contents inside them. Purge both cache folders on Windows 10 by following these steps and check if this problem resolves this way.
- First of all, open Command Prompt with administrative privileges.
- On the UAC dialog, hit Yes to allow opening this system app.
- On the elevated console, run these codes one after another –
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
Ren C:WindowsSoftwareDistribution SoftwareDistribution.old
Ren C:WindowsSystem32catroot2 Catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
- The commands starting with “Ren” will rename both SoftwareDistribution and Catroot2 folders by adding an extension
.oldto their names.
- Restart your PC and you will find two new folders created automatically at the deleted locations. Go and ensure the same at the following paths –
SoftwareDistribution – C:\Windows\
Catroot2 – C:\Windows\System32\
Go to Settings > Update & Security > Windows Update next and hit Check for updates. Windows 11 users may directly check for updates by visiting Settings > Windows Update.
5] Manually install pending updates
If none of the above workarounds help to resolve this update error code 0x8007139f on Windows, you should manually download the standalone package from Microsoft Update Catalog and later install it on your PC. Here’s a detailed guide on how to manually download and install pending updates on Windows 10 or for that matter, Windows 11.
6] Perform a System Restore
The update error code 0x8007139f must have been resolved by now. In case, it doesn’t, and you do have a restore point available on your computer, you may use that to revert back your system to its previous stable state.
Perform this task and check if doing this resolves the error code 0x8007139f on your Windows PC. If not, proceed ahead with the clean installation of Windows on your computer.
7] Perform an in-place upgrade
Microsoft offers even performing an in-place upgrade on Windows 11/10 PC. Go for this method only when none of the above fixes work in your case. The complete procedure is outlined below –
- First of all, visit the official website to download the Media Creation Tool.
- Run this tool and when this starts, click “Update now” followed by the Next button.
- Select Download and install updates (recommended) and then hit Next again.
- After this is ready to install the update, click Change what to keep.
- Make sure to choose Keep personal files and apps, and hit Next.
Follow the on-screen instructions until this in-place upgrade process is over. I hope the above set of solutions helps you to overcome the error code 0x8007139f on your PC. Let’s know in the comment section if you face any difficulty following the solutions elaborated on in this blog post.