Category Archives: Error

[Solved] smtplib Sent Email Error: SMTPDataError: (554, ‘DT:SPM 163 smtp1

When I send mail! The authorization code is written correctly in all aspects! But I encountered the following exception!

raise SMTPDataError(code, resp)
SMTPDataError: (554, 'DT:SPM 163 smtp14,EsCowABXOeQy9p5hou3fMw--.131S2 1637807667,please see http://mail.163.com/help/help_spam_16.htm?ip=118.193.105.240&hostid=smtp14&time=1637807667')

At first, I thought there was a problem with the content of the transmitted text! It is regarded as spam and cannot be sent! Then I changed it many times! Then I looked for it for a long time! Just found that it was from and to’s pit!

Questionable code:
import smtplib
from email.mime.text import MIMEText
from email.header import Header


mail_host="smtp.163.com"
mail_user="*******.com"
mail_pass="*******"
sender = '******@163.com'
receivers = ['******@qq.com','******@163.com']
body_content = """ TEST TEXTS """

message = MIMEText(body_content, 'plain', 'utf-8')
message['From'] = "********@163.com"
message['To'] = "******@qq.com"
subject = """

Replace with:

message['Subject'] = Header(subject, 'utf-8')
smtpObj = smtplib.SMTP()
smtpObj.connect(mail_host, 25)
smtpObj.set_debuglevel(1)
smtpObj.login(mail_user,mail_pass)
smtpObj.sendmail(sender, receivers, message.as_string())
print("Mail sent successfully")
smtpObj.quit()
Here the message['From'] and To are changed to the From and To character format of the emails sent and received in the mailbox!

message['From'] = "wumian<**********@163.com>"
message['To'] = "qishi<**********@qq.com>"

Done!

Alamofire iOS Sent HTTP Request Error: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file.

Cause/solution: IOS network requests require high security. They are all in HTTPS format. If you do not want to use HTTP format, you must modify it in info.plist file to allow the use of HTTP format with low security, as shown in the figure below. Add app transport security settings in info.plist = = = = = = > Allow Arbitrary Loads

 

[Solved] Feign Error: ‘xx.FeignClientSpecification’, defined in null, could not be registered.

The reason is that one spring boot cannot allow two feign clients, which should be configured in application.yml

spring:

  main:
    allow-bean-definition-overriding: true

In addition, the settings for package scanning should be set correctly, otherwise an error will be reported if the feign client of the corresponding package is not found

Qt Build Project Error: No rule to make target ‘TarWidget.cpp’, neede d by ‘TarWidget.o’. Stop.

Because I put tarwidget.cpp in the view folder, open the .Pro file:

SOURCES += TarWidget.cpp\

View/TarWidgdet.cpp\

There are two. Delete the upper one.

SOURCES += View/TarWidgdet.cpp\

It also needs to be deleted under headers.

Finally, just execute qmake.

MAC terminal (shell) Error: You have mail [How to Solve]

background

You have mail will be prompted when you open the built-in shell or iterm on the Mac computer. I didn’t care before, because I am engaged in network security work. I usually operate and plan tasks when studying the Mac. I did test it before, but it has been cleared manually, but why is there such a prompt?

process

The overall process should be as follows: first, the mail mechanism of MAC itself, especially the problem of planned tasks, that is, if the machine planned tasks are not executed as expected, it will report errors, The error result will be sent to the user in the form of e-mail and stored in:/var/mail/user name. This file is also true for Linux. So when you open the shell, you will be reminded that there are emails here. Because the SH script executed in the planned task was deleted when the planned task was created, but the planned task itself was not deleted, so the planned task reported an error and sent a lot of emails. At this time, the message received is: you have new mail, but after the prompt is completed, After that, the prompt becomes you have mail. Use the mail command to view the specific mail content:

From [email protected]  Mon Aug 30 11:24:01 2021
X-Original-To: hait
Delivered-To: [email protected]
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron <hait@B61zz> /tmp/evil.sh
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=hait>
X-Cron-Env: <USER=hait>
Date: Mon, 30 Aug 2021 11:24:00 +0800 (CST)
/bin/sh: /tmp/evil.sh: No such file or directory

Analyze the reason: it can be judged from the time that it is the email in August, which makes sense at this time. The whole process:

1. Establish the planned task and run normally;

2. Delete the SH file executed by the planned task, resulting in an error message, and then send the e-mail.

3. Delete the planned task (stop sending the error message);

4. Message unread always prompt

Solution:

1. You can directly turn off the terminal mailbox function. The link above has the command (I failed, I used plan2)

2. Delete this folder:/var/mail/user name

 

OMV openmediavault update management error: software source https://download.docker.com/linux/debian/ Buster’s option signed by contains conflicting value solutions

 

Connect the OMV system from the terminal SSH

1:

cd /etc/apt/sources.list.d

 

2:

/etc/apt/sources.list.d# ls

You can see the docker.list file

3:

/etc/apt/sources.list.d# rm docker.list

Delete this file

4:

Return to OMV system refresh and update

Or directly at the terminal

/etc/apt/sources.list.d# apt-get update && apt-get upgrade

Familiar updates are back

 

Putty connection to ubantu always reports an error access denied

It took a long time. I once felt that I was not suitable for learning technology, and I couldn’t even make the configuration. But it’s okay.

One reason: check whether SSH is installed. Command: SSH localhost

Solution: it is more convenient to check this blog post than to find other sources. https://www.cnblogs.com/cyyz-le/p/11780246.html

Reason 2: check whether the login name is correct. I fell here. A very speechless mistake.

Solution: look at the picture.

 

 

 

Cause: java.lang.ClassNotFoundException: Cannot find class: com.kuang.pojo.User

error

Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed; 
nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource:
'file [E:\javaproject\Demo11\spring-01-hellospring\spring-09-transaction\target\classes\com\kuang\mapper\UserMapper.xml]';
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file
[E:\javaproject\Demo11\spring-01-hellospring\spring-09-transaction\target\classes\com\kuang\mapper\UserMapper.xml]'.
Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException:
Could not resolve type alias 'com.kuang.pojo.User'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.kuang.pojo.User

Cause: the location of the entity class package does not correspond to the SQL mapping file correctly