Arduino Projects

Gmail Outlook Settings, Configure Gmail in Outlook, Arduino Send Email


Configure Gmail in Outlook

Gmail Outlook Settings, Configure Gmail in Outlook, Arduino Send Email- In this tutorial, you will learn how to configure Gmail in Outlook and how to design your own computer application in Visual basic dot net “VB.Net”, for accessing your Gmail account. This is going to be an amazing project which can be used in complex level SCADA “Supervisory control and data acquisition” systems.

In this tutorial, apart from the basic Gmail Outlook Settings, we will also make an Arduino and based Automatic Sensor data email system. In this project, the Arduino is connected with the computer/Laptop through the USB cable. The Arduino reads the Sensor and sends the Sensor data to the designed computer application using Serial communication. The application then sends the Sensor data through email. The email sending time can be adjusted.

To keep things simple, I have connected only one Sensor “Variable Resistor” with the Arduino Uno; by rotating the knob of the variable resistor the values are changed. Later you can modify this project as per your requirement and you can connect multiple Analog and digital Sensors with the Arduino Uno, Arduino Nano, or Arduino Mega.

So, before we can work on the Arduino and based Automatic Sensor data email system first, we will have to setup our Gmail account in Outlook.

If you want to learn in detail about the Email architecture, Email protocols like SMTP, POP3, and IMAP, Gmail account basic and Advanced level Security so that nobody can hack your Gmail account then read the article.

Without any further delay let’s get started!!!

Amazon Purchase Links:

Arduino Nano USB-C Type (Recommended)

12v Adaptor:


Other Tools and Components:

ESP32 WiFi + Bluetooth Module (Recommended)

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

Gmail Outlook Settings, Configure Gmail in Outlook:

If you already have a Gmail account that’s great, if don’t, you can start by creating a new Gmail account and make sure you activate the two step verification. Make sure Microsoft Office Outlook 2007 or latest is installed on your computer system. Follow the steps give below.

Open Microsoft Outlook.

Configure Gmail in Outlook


It really doesn’t matter if you are using Outlook 2007 or latest, the Gmail Outlook settings are exactly the same. Click on the Next button, which opens the Account Configuration window.

Configure Gmail in Outlook

While the Yes Radio option is selected again click on the Next button. This will open the Add New E-mail Account window.

Configure Gmail in Outlook

Enter any name you like, I selected the name: Sewerage as later I am going to use this account for the Sewerage monitoring.

E-mail Address:

Finally, enter your Gmail ID password. Make sure you check the manual configure server settings or additional server types before you like on the next button.

Configure Gmail in Outlook

After you click on the Next button, a new window will be opened, where you have to select the Internet E-mail option.

Configure Gmail in Outlook

While the Internet E-mail option is selected click on the Next button. This will open the Internet E-mail settings.

Configure Gmail in Outlook

Each of these settings is required to get your email account working.

User Information

Your Name: Sewerage

Email Address:

Server Information

Account Type: POP3

Incoming mail Server:

Outgoing mail server (SMTP):

Logon Information

User Name:

Password: **********

Check the remember password text box.

After you have entered all the necessary information, now click on the more settings button. This step is really important.

Configure Gmail in Outlook

Make sure the Advanced Tab is selected. Enter the Server Port Numbers.

Incoming server (POP3): 995

Make sure the checkbox next to the server requires an encrypted connection (SSL) is checked.

Outgoing server (SMTP): 465

Use the encrypted connection type as SSL.

Server Timeouts, select 5 seconds or more and click on the OK button.

Configure Gmail in Outlook

Check the box next to the Require logon using secure password authentication (SPA). Now you have to test your account settings; for this click on the Test Account Settings… button.

Configure Gmail in Outlook

If you have done everything in the same way as explained you will get a green tick. Don’t worry if you get the failed message, you can try again. If still not able, then you can open your Gmail account and activated the less secure apps.

Some apps and devices use less secure sign-in technology, which makes your account vulnerable. You can turn off access for these apps, which we recommend, or turn it on if you want to use them despite the risks. Google will automatically turn this setting OFF if it’s not being used.

This setting is not available for accounts with 2-step verification enabled. So make sure the 2-step verification OFF.

Note: do not use your Gmail account which is connected with PayPal, YouTube channel, Adsense Accounts, etc. I recommend using a new Gmail account will be great.

So after you allow the less secure apps, then again you can click on the Test Account Settings button and this time you should get a green tick. So after your settings are verified then you can click on the Next button.

Configure Gmail in Outlook


You have successfully entered all the information required to setup your account. Now you can click on the Finish button.

Configure Gmail in Outlook

While the Microsoft Office Outlook is opened. Click on the Tools menu and then click on the Account Settings, if in case you want to change any of the settings.

Configure Gmail in Outlook

Again click on the Tools Menu > Send/Receive > Send/Receive Settings > Define Send/Receive Groups.

Configure Gmail in Outlook

You can set the Schedule an automatic send/receive every 1 minute. You can change this time. So the Outlook will automatically fetch new emails. This setting should be done.

So our Gmail Outlook settings are completed. Now you don’t need to open your Gmail account, again and again, now you can use Outlook. You can stop over here or you can continue to read this article and learn other things like how to make an Automatic Email sending system using and Arduino. This project can also help you in designing your own Email marketing system, which can send emails automatically.

Arduino and based Automatic Sensor data Email system:

As I said earlier, this project can be easily modified and so many other amazing projects can be designed using the VB.Net and Arduino. Or you can also use the Visual Basic alone. You can make

  • an automatic Email marketing Application using
  • Security System with Email alerts.
  • Advanced SCADA system with automatic email alerts etc. and Arduino Serial Communication Circuit Diagram:

Configure Gmail in Outlook

As you can see the circuit diagram is very simple. A potentiometer or variable resistor is connected with the Arduino Uno. You can also use Arduino Nano or Arduino Mega. The middle leg of the potentiometer is connected with the analog pin A1. While the other two legs of the potentiometer are connected with the Arduino’s 5 volts and GND pins.

If you don’t have a variable resistor it’s fine, you can send any text from Arduino to the Visual Basic application using Serial Communication. Now, let’s have a look at Arduino Programming.

Project Code:

Program Explanation:

I simply started off, by defining a pin for the variable resistor. As you can see I am using the Arduino’s Analog pin A1.

int Vresistor = A1;

Next, I defined a variable for storing the variable resistor value.

int Vrdata = 0;

Finally, I defined a variable finaldata of the type String for making a complete string message consisting of the variable resistor data.

String finaldata;

In the void setup() function, I simply activated the serial communication using the Serial.begin() function and selected 9600 as the baud rate. This is really important. If you forgot to activate the serial communication then you won’t be able to send data serially from Arduino to visual basic or from Visual Basic to Arduino Uno.

Next, I set the Vresistor as the INPUT. Instead of using the Variable resistor you can use any other type of sensor.

void setup()



pinMode(Vresistor, INPUT);


Then starts the void loop() function, which is executed repeatedly.

void loop()


First, we read the variable resistor and store the data in variable Vrdata.

Vrdata = analogRead(Vresistor);

Next, I mapped the data using the map function, this is used to limit the min and max values.

Vrdata = map(Vrdata,0,1023,0,200);

Then I created a complete string message.

finaldata = finaldata + “Variable Resistor Value:” + Vrdata;

Finally, sent the data to the visual basic application using the Serial.println() function. the sensor data is sent to the visual basic application after every 1 second. And finally, we empty the finaldata variable, so that new data can be stored.



finaldata = “”;



So, now that we are done with the Circuit diagram and Basic Arduino programming for reading the Sensor and then sending the data to the Visual Basic application. Now it’s time to discuss the Visual basic application designing for monitoring the sensor and sending the data through email.

Visual Basic Application for Sensor Monitoring and Sending Email:

Configure Gmail in Outlook

As you can see the Application is very simple. It consists of only one form. I have only used three components on the form, a label “Sensors Data From Arduino Uno”, CheckBox1, and a Textbox “the white rectangular area”.

Below you can see, I have used two timers Timer1 and Timer2 and a Serial Port “SerialPort1”.

After you make this, you can then copy and paste the following code.

Project Testing:

Finally, I connected the Arduino Uno with the Laptop and run the application.

Configure Gmail in Outlook

A sent a random Text message from the Arduino to the application, if you want you can use the above Arduino program. You can see the CheckBox1 is checked which means it’s sending the email.

Configure Gmail in Outlook

As you can see I successfully received the emails.

Now instead of opening the inbox, we can receive these emails in our designed Visual Basic application. We have already setup our Gmail account in Outlook.

Now Let’s make another visual Basic application for fetching emails from the Gmail account using the Outlook.

Gmail Outlook Email Fetching Visual Basic Application:

Configure Gmail in Outlook

Download the Email Receiving Visual Basic Application: email receiving

Gmail Outlook Visual Basic Application Programming:

Final Testing:

Configure Gmail in Outlook

You can see I can send emails using the designed application and I can also receive emails using my designed application.

Note: The Sending email application is designed in Microsoft visual basic express edition 2010.

While the receiving Email application is designed in VB6.

Watch Video Tutorial:

Related Tutorial:



Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button