import smtplib
    from email.mime.text import MIMEText
    
    # 第三方 SMTP 服务
    mail_host="smtp.XXX.com" #设置服务器
    mail_user="XXXXXXXXXX"   #用户名
    mail_pass="XXXXXXXXXX"   #口令
    
    sender = 'XXXXXXXXXX'
    receivers = ['XXXXXX']   #接收邮箱
    
    msg = MIMEText('The body if the email is here', 'plain', 'utf-8')
    msg['Subject'] = "An Email Alert"
    
    try:
        smtpObj = smtplib.SMTP()
        smtpObj.connect(mail_host, 25)    # 25 为 SMTP 端口号
        smtpObj.login(mailuser, mailpass)
        smtpObj.sendmail(sender, receivers, msg.as_string())
        print("邮件发送成功")
    except smtplib.SMTPException:
        print("Error: 无法发送邮件")
    finally:
        smtpObj.quit()