. The results of the operation are as follows:
More See also: Iconv-lite
2, Nodejs send mail
Do not want to say, directly on the code, easy to understand:
Copy Code code as follows:
var Nodemailer = require (' Nodemailer ');
//Configure mail var transporter = nodemailer.createtransport (' SMTP ', { service: ' 163qiye ', Auth: { User: ' zhoujie0111@126.com ', pas
Nodejs crawler, post requests to send request Playload format data.
This article takes the NetEase Cloud Classroom 2 POST request as the example, uses the request module to realize. Example 1
1. Address:
http://study.163.com/dwr/call/plaincall/MongoAttributesBean.obtainByRandomWithLimitTime.dwr?1521595046314
2. Request screenshot
From the image above you can see "Content-type" as "text/plain"; the way to
About Nodejs read Chinese files really toss a lot of time, online various programs, finally no one applicable to me, fortunately solved.The following three knowledge points are extracted from the project, to run the script separately, you need to use the Global mode to install the module , such as the installation of the Chinese conversion module (the following other needs to do so):NPM install-g Iconv-liteNPM install-g NodemailerNPM install-g Node-sc
Async Version: http://blog.csdn.net/zzwwjjdj1/article/details/52129192write this version is mainly, promise more useful, and, now is the nodejs of the built-in objects, no need to reference third-party library-The tools neededMySQL DatabaseConnection database module MySQL Basic package: http://blog.csdn.net/zzwwjjdj1/article/details/51991348Auto-run module Node-schedule basic use: http://blog.csdn.net/zzwwjjdj1/article/details/51898257Generate Excel T
-The tools neededMySQL DatabaseConnection Database module MySQL Basic package: http://blog.csdn.net/zzwwjjdj1/article/details/51991348Auto-run module Node-schedule basic use: http://blog.csdn.net/zzwwjjdj1/article/details/51898257Generate Excel Table Node-xlsxSend mail Nodemailer basic use: http://blog.csdn.net/zzwwjjdj1/article/details/51878392Async Process Control Module Async BASIC use: http://blog.csdn.net/zzwwjjdj1/article/details/51857959--Installation moduleI set up a folder on the F driv
The project used a lot of third-party libraries, these libraries in the production environment when used to send HTTPS requests out, but send the request when the Nodejs will verify the certificate, no certificate will not pass, here can modify the code to modify the problem,1. Add the following code when sending an HTTPS request:false,, a library:2. There is als
Nodejs uses mailer to send emails
In practical applications, sometimes you need to push messages to you in a timely manner when the server has special information, so that you are prepared and processed. There are a large number of servers in the project, therefore, it is not convenient to Manage Server clusters. When an exception exits on each server, I send an
First you need to install Nodemailer#nmp Nodemailer Install--saveThen just rewrite the example of the official document, the code is as follows:' Use strict '; Const Nodemailer= Require (' Nodemailer ');//Generate Test SMTP service account from Ethereal.email//Only needed if you don't have a real mail account for testingNodemailer.createtestaccount (err, account) = { //Create reusable Transporter object using the default SMTP transportLet transporter =Nodemailer.createtransport ({host:' Smtp.
install MAILX, rely on it to send mailyum install mailxEditing a configuration filevim /etc/mail.rc #添加如下内容set [emailprotected]set smtp=smtp.163.comset [emailprotected]set smtp-auth-password=xxxset smtp-auth=login---说明from:对方收到邮件时显示的发件人smtp:指定第三方发邮件的smtp服务器地址set smtp-auth-user:第三方发邮件的用户名set smtp-auth-password:用户名对应的密码,有些邮箱填的是授权码smtp-auth:SMTP的认证方式,默认是login,也可以改成CRAM-MD5或PLAIN方式Linux script File source code (note must be directly in the Linux system di
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.