Gmail smtp settings for sending mail

Here are the Gmail SMTP settings for sending mail:

SMTP Server:

Authentication:

Encryption:

Additional settings:

Note:

Here's an example of what the settings might look like in a mail client or programming language:

PHP (using the PHPMailer library):

<?php
require_once 'PHPMailer/PHPMailer.php';
require_once 'PHPMailer/SMTP.php';

$mail = new PHPMailer\PHPMailer\PHPMailer();
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = 'your_password';
$mail->SMTPSecure = 'tls';
$mail->From = '[email protected]';
$mail->FromName = 'Your Name';
$mail->addAddress('[email protected]', 'Recipient Name');
$mail->Subject = 'Test email';
$mail->Body = 'This is a test email';

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

Python (using the smtplib library):

import smtplib
from email.mime.text import MIMEText

msg = MIMEText('This is a test email')
msg['Subject'] = 'Test email'
msg['From'] = '[email protected]'
msg['To'] = '[email protected]'

server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login('[email protected]', 'your_password')
server.sendmail('[email protected]', '[email protected]', msg.as_string())
server.quit()

Remember to replace [email protected] and your_password with your actual Gmail address and password.