Ask Cách đăng nhập vào nhiều tài khoản Gmail trên ESP8266

Gologin

Well-known member
** Cách đăng nhập vào nhiều tài khoản Gmail trên ESP8266 **

** Điều 1 **

[!)

Trong bài viết này, chúng tôi sẽ chỉ cho bạn cách đăng nhập vào nhiều tài khoản Gmail trên ESP8266.Đây là một cách tuyệt vời để quản lý nhiều tài khoản email từ một thiết bị.

## Điều kiện tiên quyết

Để làm theo hướng dẫn này, bạn sẽ cần những điều sau đây:

* Một bảng phát triển ESP8266
* Một cái bánh mì
* Một vài dây nhảy
* Một máy tính có cài đặt arduino IDE
* Tài khoản Google

## Bước

1. ** Tạo một tài khoản Google mới. ** Nếu bạn chưa có tài khoản Google, bạn có thể tạo một tài khoản miễn phí tại [https://accounts.google.com/signupTHER(https://accounts.google.com/signup).
2. ** Tải xuống Arduino IDE. ** Bạn có thể tải xuống Arduino IDE miễn phí từ [https://www.arduino.cc/en/software/THER(https://www.arduino.cc/en/software/).
3. ** Cài đặt thư viện ESP8266. ** Thư viện ESP8266 là một thư viện cần thiết để làm việc với các bảng phát triển ESP8266.Bạn có thể cài đặt thư viện bằng cách làm theo các hướng dẫn trên trang web [ESP8266] (Everything ESP8266).
4. ** Mở Arduino IDE. ** Khi arduino IDE được cài đặt, hãy mở và chọn tệp **> MỚI ** để tạo bản phác thảo mới.
5. ** Sao chép mã sau vào bản phác thảo: **

`` `
#include <Esp8266wifi.h>

const char* ssid = "your_wifi_ssid";
const char* password = "your_wifi_password";

const int num_gmail_accounts = 3;
Chuỗi gmail_accounts [num_gmail_accounts] = {
"Your_gmail_account_1",
"Your_gmail_account_2",
"Your_gmail_account_3"
};

void setup () {
Nối tiếp.begin (115200);
Wifi.begin (ssid, mật khẩu);

while (wifi.status ()! = wl_connected) {
độ trễ (500);
Serial.print (".");
}

Serial.println ("wifi kết nối");
Serial.println ("địa chỉ IP:" + wifi.localip ());
}

void loop () {
for (int i = 0; i <num_gmail_accounts; i ++) {
Serial.println ("Đăng nhập vào tài khoản gmail" + gmail_accounts );
Máy khách WificLientheCure;
client.connect ("smtp.gmail.com", 465);
client.println ("ehlo gmail.com");
client.println ("đăng nhập auth");
client.println (base64.encode ("your_gmail_username"));
client.println (base64.encode ("your_gmail_password"));
client.println ("Thư từ: <your_gmail_address>");
client.println ("rcpt to: <your_gmail_address>");
client.println ("dữ liệu");
client.println ("Chủ đề: Email kiểm tra");
client.println ("Từ: your_gmail_address");
client.println ("to: your_gmail_address");
client.println ("Đây là email kiểm tra.");
client.println (".");
client.println ("thoát");
client.stop ();

Serial.println ("Đăng nhập vào tài khoản gmail" + gmail_accounts );
}

độ trễ (5000);
}
`` `

6. ** Lưu bản phác thảo
=======================================
**How to Log in to Multiple Gmail Accounts on ESP8266**

**Article 1**

[![How to Log in to Multiple Gmail Accounts on ESP8266](https://img.youtube.com/vi/dQw4w9WgXcQ/0.jpg)](https://www.youtube.com/watch?v=dQw4w9WgXcQ)

In this article, we will show you how to log in to multiple Gmail accounts on ESP8266. This is a great way to manage multiple email accounts from a single device.

## Prerequisites

To follow this tutorial, you will need the following:

* An ESP8266 development board
* A breadboard
* A few jumper wires
* A computer with Arduino IDE installed
* A Google account

## Steps

1. **Create a new Google account.** If you don't already have a Google account, you can create one for free at [https://accounts.google.com/signup](https://accounts.google.com/signup).
2. **Download the Arduino IDE.** You can download the Arduino IDE for free from [https://www.arduino.cc/en/software/](https://www.arduino.cc/en/software/).
3. **Install the ESP8266 library.** The ESP8266 library is a necessary library for working with ESP8266 development boards. You can install the library by following the instructions on the [ESP8266 website](https://www.esp8266.com/).
4. **Open the Arduino IDE.** Once the Arduino IDE is installed, open it and select **File > New** to create a new sketch.
5. **Copy the following code into the sketch:**

```
#include <ESP8266WiFi.h>

const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";

const int num_gmail_accounts = 3;
String gmail_accounts[num_gmail_accounts] = {
"YOUR_GMAIL_ACCOUNT_1",
"YOUR_GMAIL_ACCOUNT_2",
"YOUR_GMAIL_ACCOUNT_3"
};

void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}

Serial.println("WiFi connected");
Serial.println("IP address: " + WiFi.localIP());
}

void loop() {
for (int i = 0; i < num_gmail_accounts; i++) {
Serial.println("Logging in to Gmail account " + gmail_accounts);
WiFiClientSecure client;
client.connect("smtp.gmail.com", 465);
client.println("EHLO gmail.com");
client.println("AUTH LOGIN");
client.println(Base64.encode("YOUR_GMAIL_USERNAME"));
client.println(Base64.encode("YOUR_GMAIL_PASSWORD"));
client.println("MAIL FROM: <YOUR_GMAIL_ADDRESS>");
client.println("RCPT TO: <YOUR_GMAIL_ADDRESS>");
client.println("DATA");
client.println("Subject: Test email");
client.println("From: YOUR_GMAIL_ADDRESS");
client.println("To: YOUR_GMAIL_ADDRESS");
client.println("This is a test email.");
client.println(".");
client.println("QUIT");
client.stop();

Serial.println("Logged in to Gmail account " + gmail_accounts);
}

delay(5000);
}
```

6. **Save the sketch
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top