IT Technical Support for Developers

Windows




PHPMailer Enable 2FA Send Mail with 2 Step Authentication

How to send mail using PHP mailer if two factor authentication?

2 Step Verification

Gmail 2 steps verification

To send emails using PHPMailer with 2-factor authentication (2FA), you'll need to generate an "App Password" or set up OAuth2. Instead of your regular password, use the App Password in PHPMailer's settings.

Steps to Create App Password

Enable 2FA: Make sure 2FA is enabled in your Google Account.

Create a custom app in your Gmail security settings.
Step 1 Click Google Apps icon (right side top near user logo)
Step 2 Click Account
Step 3 Click Security Menu from left side
Step 4 Type "App password" in the search field
Step 5 Click "App Password" Link
Step 6 Enter the App Name as PHPMailer and submit
Step 7 You will get App Password.(It will generate a token to use in the App )

This is what you'll use in PHPMailer.

Sample Code

$email = new PHPMailer(true);

$email->IsSMTP(); // Use SMTP
$email->Host= 'smtp.gmail.com'; // Sets SMTP server

$email->SMTPDebug = 0; // 2 to enable SMTP debug information
$email->Debugoutput = 'html';
$email->SMTPAuth = TRUE; // enable SMTP authentication
$email->SMTPSecure = "SSL"; //Secure conection
$email->Port = 587; // set the SMTP port
$email->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);

$email->Username = 'your_email@gmail.com'; // Your Gmail address
$email->Password = 'your_app_password'; // The App Password
$email->setFrom('your_email@gmail.com', 'Your Name');
$email->addAddress('recipient@example.com', 'Recipient Name');
$email->Subject = '2FA Test Email';
$email->Body = 'This is 2 Step Verification Mail Sent by PHPMailer.';

if ($email->send()) {
echo 'Message sent!';
} else {
echo 'Mailer Error: ' . $mail->ErrorInfo;
}

Use the token as password in combination with your full Gmail account and two factor authentication will not be required.

How to enable two factor authentication in Gmail





How do I fix error 0xC1900101?

How can I fix 0xC1900101 errors on Windows 10 to Windows 11 Upgrade?

The other reason that people fail the upgrade is that they do not realize that a lot of free space is needed in order for the update to install. If users have completed all the required steps before starting the installation process, the cause for the 0xC1900101 – 0x60016 error can be quite complicated.

How to fix error code 0xC1900101 upgrading to Windows 11

The error codes starting with 0xC1900101 or 0x80090011 can indicate various problems during the Windows 11 upgrade process.
These are the common "0xC1900101" errors that you may come across upgrading to Windows 11:

0xC1900101 - 0x2000c
0xC1900101 - 0x20017
0xC1900101 - 0x30017
0xC1900101 - 0x30018
0xC1900101 - 0x3000D
0xC1900101 - 0x4000D
0xC1900101 - 0x40017

Cleanup storage space

The setup of Windows 11 requires several gigabytes of space to process the upgrade. If the device does not have enough available space, you may see one of the 0xC1900101 error codes. You can get around this problem by using the "Storage" and "Apps & features" settings to free up space.

You can use this guide to find many tips to delete unnecessary files to free up storage space.

Disconnect devices

If the computer has peripherals like external drives, printers, Bluetooth devices, USB devices, cameras, disconnect them before proceeding to reduce the chances of errors and other issues upgrading to Windows 11. You can always reconnect them after the upgrade.

Uninstall security apps

If there is a problem with third-party security software, you will likely see the error codes 0xC1900101 0x20017 and 0xC1900101 0x30017.

Repair corrupted files

1. Press Windows + X keys altogether to launch the Power menu

2. Select Run option on the list and type cmd in the text box

3. Now press Ctrl + Shift + Enter to open Command Prompt as Admin

4. If the UAC dialog appears up, click Yes to authorize the access

5. On the elevated console, type the following command, and press Enter:

sfc /scannow

6. Reboot

Windows 11 How to install on unsupported hardware




Win 11 an existing connection was forcibly closed (OS error 10054)

SQL server error 10054 - Fix

Error 10054,
Cannot connect remotely to SQL Server Express Win 11, A network-related or instance-specific error
ADDITIONAL INFORMATION
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
Got the same issue on a Windows 11 computer trying to connect to an old SQL 2005 DB. It looks like some ciphers are disabled on Windows 11 and prevent the connection with the Database.

Solution

In Powershell (as admin) after running the following command, I could connect to the DB. Hope this helps.
Solution for Error 10054
Enable-TlsCipherSuite -Name "TLS_RSA_WITH_3DES_EDE_CBC_SHA"

Copy and paste the above command in powershell, it will work for you.

Key Search

sql server error 10054 windows 11
mssqlserver-10054-database-engine-error
windows 11 accessing sqlexpress error 10054
error 10054 an existing connection was forcibly closed by the remote host
sql server error 10054 pre-login handshake
SQL Server not connected after windows 11 update


Related Links...

0x00000040, How to Fix Win 11 Printer Sharing to win 10 /win 7


Upgrade from Windows 7 to Windows 10 for free


Windows 10 printer sharing error 0x0000011b


How do I fix Windows Update 11 error?


Windows 11 How to install on unsupported hardware


Windows 10 printer error 0x00000709


Windows 11 How to Launch Task Manager


How to get Windows 11 without TPM 2.0


Windows 11 error code 0x800f0950


Windows 10 printer sharing error 0x0000011b FIX


Windows 11 Upgrade from Windows 10 - A Free Upgrade




Latest Post

Tally Prime 6.2 What is new

/Tally Integration Capabilities

Lucy Edit AI - Free AI Video Editor Online

/Artificial Intelligence AI

Rajinikanth with a salt-and-pepper beard wearing a stylish suit AI Vid

/Artificial Intelligence AI

How to generate Nano Banana 3D Figurine Image

/Artificial Intelligence AI

AI What is Next

/Artificial Intelligence AI