Unit - 2
Shell Programming and Internet
Shell Scripting is a free and open-source programming software that runs on the Unix/Linux shell. Shell Scripting is a program that allows you to write a series of commands to be executed by the shell. It can condense long and repetitive command sequences into a single, simple script that can be saved and executed at any time, reducing programming time.
Shells such as bash and korn in Linux support programming constructs that can be stored as scripts. Many Linux commands are scripted as a result of these scripts being shell commands.
To understand how their servers and applications are started, updated, maintained, or disabled, and to understand how a user interface is designed, a system administrator should have a basic understanding of scripting.
Shells are usually interactive, which means they accept user commands as input and execute them. However, there are times when we need to run a series of commands on a regular basis, and we must type all commands into the terminal each time.
We can write these commands in a file and execute them in shell to avoid this repetitive work because shell can take commands from files as input. Shell Scripts or Shell Programs are the names given to these files. The batch file in MS-DOS is identical to shell scripts. Each shell script has a.sh file extension, such as myscript.sh.
Shell scripts use the same syntax as other programming languages. It will be very simple to get started if you have previous experience with any programming language such as Python, C/C++, or others.
The following elements make up a shell script:
● Shell Keywords – if, else, break etc.
● Shell commands – cd, ls, echo, pwd, touch etc.
● Functions
● Control flow – if..then..else, case and shell loops etc.
Key takeaway
Shell Scripting is a free and open-source programming software that runs on the Unix/Linux shell. Shell Scripting is a program that allows you to write a series of commands to be executed by the shell.
Normally, the shell runs the commands in a script in the order they are written in the text, one after the other.
Frequently, though, you will want to alter the way commands are executed.
Depending on the circumstances, you may want to run one command over and over, or you may want to run a command several times.
The shell provides a number of control mechanisms that can be used to change the order in which commands are executed.
There are two different types of selection mechanisms that allow you to choose between different commands:
● if/then/elif/else/fi
● case
The if statement
The if statement allows you to decide whether to run a command (or a group of commands) based on a condition.
The most basic version of this structure is as follows:
If conditional expression
Then
Command(s)
Fi
When the shell comes across a structure like this, it tests to see if the conditional expression is valid first.
If this is the case, the shell executes any commands found between the then and the fi (which is just if spelled backwards).
The shell skips the commands between then and fi if the conditional expression is false.
Example:
Here's a shell script that makes use of easy if statements:
#!/bin/sh
Set ‘date‘
If test $1 = Fri
Then
Echo "Thank goodness it’s Friday!
Fi
The test commands
In this conditional expression, we used the test instruction.
The phrase is:
Test $1 = Fri
The test command tests to see if the parameter $1 contains Fri; if it does, the condition is valid, and the message is printed.
The test command may run a number of tests; see the documentation for more details.
Using elif and else
Combining the if statement with the elif (“then if”) and else statements allows one to create even more complex selection structures.
Here's an easy example.
#!/bin/sh
Set ‘date‘
If test $1 = Fri
Then
Echo "Thank goodness it’s Friday!"
Elif test $1 = Sat 11 test $1 = Sun
Then
Echo "You should not be here working."
Echo "Log off and go home."
Else
Echo "It is not yet the weekend."
Echo "Get to work!"
Fi
The case Statement
On certain UNIX systems, the shell offers another selection structure that could be faster than the if argument.
This is the case statement, which takes the following form:
Case word in
Patternl) command(s) ;;
Pattern2) command(s) ;;
...
PatternN) command(s) ;;
Esac
The case statement compares word to pattern1, and if the two are equal, the shell executes the command(s) on the first line.
Otherwise, the shell goes through the remaining patterns one by one until it finds one that fits the expression, at which point it executes the command(s) on that line.
The default value is *.
Example:
Here's an example of a basic shell script that employs case statements:
#!/bin/sh
Set ‘date‘
Case $1 in
Fri) echo "Thank goodness it’s Friday!";;
Sat | Sun) echo "You should not be here working"; echo "Log off and go home!";;
*) echo "It is not yet the weekend."; echo "Get to work!";
Esac
For Loops
We sometimes want to repeat a command (or a set of commands).
Iteration, repetition, or looping are terms used to describe this method.
The for loop is the most common shell repetition structure, and it has the following general form:
For variable in list
Do
Command(s)
Done
Example:
Here's an easy example:
#!/bin/sh
For host in $*
Do
Ping $host
Done
While Loops
The while loop is described as follows:
While condition
Do
Command(s)
Done
The commands between the do and the done are executed as long as the condition is true.
Example:
#!/bin/sh
# Print a message ten times
Count=10
While test $count -gt 0
Do
Echo $*
Count=‘expr $count - 1
Done
Until Loops
The until loop is another form of iteration structure.
It takes the following general form:
Until condition
Do
Command
Done
Unless the condition is valid, this loop continues to execute the command(s) between do and done.
Instead of using while loops, we can rewrite the previous script using an until loop:
#!/bin/sh
# Print a message ten times
Count=10
Until test $count -eq 0
Do
Echo $*
Count=‘expr $count
Done
Conditional Execution
The Exit Code of the first command is used in the following two examples to conditionally execute the second command. The logical AND operator, &&, only runs the second command if the first one was good.
$ gcc myprog.c && a.out
If the first command fails, the logical OR operator || executes the second command.
$ gcc myprog.c || echo compilation failed
Continue statement
The continue statement is identical to the break instruction, except that it only exits the current loop iteration, not the entire loop.
If an error occurs, but you still want to attempt to perform the next iteration of the loop, use this expression.
Syntax:
Continue
The continue instruction, like the break statement, can be given an integer argument to skip commands from nested loops.
Continue n
The nth enclosing loop to proceed from is defined by n.
Example:
The continue statement is used in the following loop, which returns from the continue statement and begins processing the next statement.
#!/bin/sh
NUMS="1 2 3 4 5 6 7"
For NUM in $NUMS
Do
Q=expr $NUM % 2
If [ $Q -eq 0 ]
Then
Echo "Number is an even number!!"
Continue
Fi
Echo "Found odd number"
Done
When you run it, you'll get the following result:
Found odd number
Number is an even number!!
Found odd number
Number is an even number!!
Found odd number
Number is an even number!!
Found odd number
Break statement
Since all of the lines of code up to the break statement have been executed, the break statement is used to end the loop's execution. It then descends to the code following the loop's conclusion.
Syntax:
To get out of a loop, use the break statement below.
Break
This format can also be used to exit a nested loop with the break command -
Break n
The nth enclosing loop to exit from is defined by n.
Example:
Here's a simple example that demonstrates how the loop ends when an equals 5.
#!/bin/sh
a=0
While [ $a -lt 10 ]
Do
Echo $a
If [ $a -eq 5 ]
Then
Break
Fi
a=expr $a + 1
Done
When you run it, you'll get the following result:
0
1
2
3
4
5
Here's a simple nested for loop illustration. If var1 equals 2 and var2 equals 0, this script exits all loops.
#!/bin/sh
For var1 in 1 2 3
Do
For var2 in 0 5
Do
If [ $var1 -eq 2 -a $var2 -eq 0 ]
Then
Break 2
Else
Echo "$var1 $var2"
Fi
Done
Done
When you run it, you'll get the following result. You have a break command with the argument 2 in the inner loop. This means that if a condition is met, you can exit the outer loop and eventually the inner loop as well.
1 0
1 5
The read command in Linux is used to read a line's contents into a variable. For Linux systems, this is a built-in command. As a result, we won't need to install any more software. When writing a bash script, it's a simple tool to utilise to get user input. It's a useful tool, just like the echo command and the positional parameter. It's used to separate the words associated with the shell variable. It is mostly used to receive user input, but it can also be used to implement functions while receiving input.
Syntax:
The read command has the following basic syntax:
Read [options] [name...]
How to use the read command?
With and without arguments, the read command can be used. Let's have a look at how the read command might be used in different situations:
● Default Behaviour
If we run the read command without any arguments, it will accept a line as user input and save it in the 'REPLY' built-in variable. Run the command as follows:
Read
The command above will prompt the user for input. To save the user input, type it in and hit the ENTER key. Execute the command as follows to see the entered content:
Echo $REPLY
The above command will display the 'REPLY' variable's stored input.
● Specify the variables to store the values
We can define the variables that will be used to store the data. If the number of provided variables is less than the number of entered words, all leftover words will be stored in the last variable by default. Consider the command below:
Read var1 var2 var3
● read -p
For the prompt text, the '-p' option is used. It reads the data as well as some hints. This tip text guides us through the process of typing text, such as what to type. Consider the command below:
Read -p " Enter your name: "
The command above will prompt you for your name; type it in. The name will be saved in the variable 'REPLY.' Execute the following command to see the variable value:
Echo " My name is $REPLY"
● read -n
The '-n' option shortens the character length in the entered text. It will not allow you to type more than the number of characters specified. It will automatically cease reading after the maximum number of characters has been reached. Execute the following command to limit the number of characters to six:
Read -n 6 -p " Enter 6 characters only: "
We can't enter more than 6 characters with the instruction above.
● read -s
For security reasons, the '-s' option is utilised. It is used to read sensitive information. The entered text will not appear in the terminal if this option is selected. With this option, we can use additional options. In this option, the characters are read aloud. Its primary function is to read passwords from the keyboard. Consider the command below:
Read -s -p "Enter password: "
The above command will demand for a password, but the password will not be displayed on the terminal when we type it.
Echo statement
In Linux, the echo command is used to display a line of text/string that has been supplied as an argument. This is a built-in command that outputs status text to the screen or a file. It's typically used in shell scripts and batch files.
Syntax:
Echo [option] [string]
Displaying a text/string :
Syntax:
Echo [string]
Example:
Echo -e "World \bis \bBeautiful"
Output
Implementations of the echo command
SymbOS, KolibriOS, HP MPE/iX, ReactOS, Microsoft Windows, IBM OS/2, Digital Research FlexOS, Acorn Computers Panos, Microwave OS-9, Zilog Z80-RIO, MetaComCo TRIPOS, TSC FLEX, Multics, Unix-like, and Unix operating systems all provide the echo command.
Several shells, including Csh-like shells (such as zsh or Bash), Bourne-like shells, COMMAND.COM, and cmd.exe, use the echo command as a built-in command.
The command also exists inside the EFI shell.
Echo Command Options
The echo command has a number of different options. The following alternatives are listed and explained:
1. b: Use this option to remove all spaces from the text/string.
Example
Echo -e "Flowers \bare \bBeautiful"
2.\c: This option is used in conjunction with the '-e' backspace interpreter to suppress the trailing new line and continue without emitting any new lines.
Example
Echo -e "World \cis Beautiful"
3. \n: This option is used to generate a new line, which will be formed from the location where it is used.
Example:
Echo -e "World \nis \nBeautiful"
4. Echo *: This option prints every folder or file in the system. It's the same as the Linux ls command.
Example:
Echo *
5. -n: This option is used to skip echoing new lines at the end.
Example:
Echo -n "World is Beautiful"
6. Print "Hello All!" on the terminal: Use the following command to print the text "Hello All!" on the terminal:
Example:
$ echo "Hello All!"
7. Print specified file types: For example, if we want to print every '.c' file, we can use the command below:
Example:
$ echo *.txt
Text editors are used to build Shell Scripts. Open a text editor program on your Linux system, create a new file, and begin typing a shell script or shell programming. Next, grant the shell permission to execute your shell script, and save your script anywhere the shell can find it.
Let's take a look at how to make a Shell Script:
● Using a vi editor, create a file (or any other editor). .sh is the extension for a script file.
● #! /bin/sh is a good way to start the script.
● Make a program.
● Filename.sh is the name of the script file.
● Type bash filename.sh to run the script.
"#!" is a shebang operator that sends the script to the interpreter's position. The script is guided to the bourne-shell if we use "#! /bin/sh."
Let's make a quick script -
#!/bin/bash
# My first script
Echo "Hello World!"
Fig 1: Steps to create shell scripting in linux
Generating output:
The read command is used in the following script to take input from the keyboard, allocate it to the variable Individual, and finally print it on STDOUT.
#!/bin/sh
# Author: Zara Ali
# Copyright (c) Tutorialspoint.com
# Script follows here:
Echo "What is your name?"
Read PERSON
Echo "Hello, $PERSON"
Output:
Here's an example of the script in action:
$./test.sh
What is your name?
Zara Ali
Hello, Zara Ali
$
Example:
The wc command in Bash is used to count a file's total number of lines, sentences, and characters. To generate the output, this command uses the options -c, -w, and -l, as well as the argument filename. To test the next script, create a text file called fruits.txt with the following details. Text file
Fruits.txt
Mango
Orange
Banana
Grape
Guava
Apple
To count and store the total number of words in the fruits.txt file into a variable, $count words, and print the value using the echo command, run the following commands.
$ count_words=wc -w fruits.txt
$ echo "Total words in fruits.txt is $count_words"
Output:
Key takeaway
Text editors are used to build Shell Scripts. Open a text editor program on your Linux system, create a new file, and begin typing a shell script or shell programming. Next, grant the shell permission to execute your shell script, and save your script anywhere the shell can find it.
Alternative name to internet is either the net or web.
● The internet is also considered a Superhighway for transmitting information.
● It is the largest network in the world that connects hundreds of thousands of individual networks all over the world. The Internet moves your ideas and information from one place to another place.
Fig 2: Internet
How to access the Internet
● The Internet utilizes the TCP/IP protocol and is accessed using a computer modem, broadband network that is connected through an ISP (Internet Service Provider).
● An Internet Service Provider (ISP) is an organization which provides services for accessing and using the internet.
● In the case of broadband, many computers use Wi-Fi to connect to router that is connected to the ISP.
● Many of the institutes, schools and businesses have direct access to the Internet using special high-speed communication lines and equipment.
● Students and employees can access through the organization’s Local Area Networks (LAN) or through their own personal computers.
● As the Internet contains billions of web pages created by different companies from around the world, the search engine is used for finding information on the Internet.
Uses of the Internet:
● Files, pictures, songs, and video can be shared by downloading (receiving) and uploading (sending).
● Send e-mail messages.
● The Internet is also used for communicating with others through social networks, online games, forums, chat, e-mails etc.
● Participate in discussion groups, such as mailing lists and newsgroups.
● Surfing the web.
● To make life more convenient internet also provides thousands of services. For example, many financial Companies offer online banking that enables a user to manipulate and view their account online.
Key takeaway
The internet is also considered a Superhighway for transmitting information.
It is the largest network in the world that connects hundreds of thousands of individual networks all over the world. The Internet moves your ideas and information from one place to another place.
It is an interconnected computer network system that spans the globe. It makes use of the TCP/IP protocol, which is widely used on the internet. A unique IP address is assigned to every machine on the Internet. An IP Address (for example, 110.22.33.114) is a series of integers that identify the location of a computer.
A DNS (Domain Name Server) computer is used to give an IP Address a name so that a user can find a computer by name.
ARPANET was expanded to connect the Department of Defense with US colleges conducting defense-related research. It included most of the country's major universities. When University College London (UK) and Royal Radar Network (Norway) joined to the ARPANET and formed a network of networks, the concept of networking received a boost.
Stanford University's Vinton Cerf, Yogen Dalal, and Carl Sunshine invented the name "internet" to characterize this network of networks. They also collaborated on protocols to make information sharing via the Internet easier. The Transmission Control Protocol (TCP) is still the networking's backbone.
In the 1960s, the Internet was created as a means for government researchers to communicate information. In the 1960s, computers were enormous and stationary, and in order to access information stored on them, one had to either travel to the computer's location or have magnetic computer tapes transported through the mail system.
The escalation of the Cold War was another factor in the development of the Internet. The launch of the Sputnik satellite by the Soviet Union prompted the United States Defense Department to examine how information may be distributed even after a nuclear attack. This eventually led to the creation of the ARPANET (Advanced Research Projects Agency Network), which eventually evolved into the Internet we know today.
ARPANET was a huge success, but it was only open to a few academic and research institutions with Defense Department contracts. As a result, new networks were formed to facilitate information sharing.
The Internet celebrates its formal birthday on January 1, 1983. Prior to this, there was no standard means for computer networks to communicate with one another. Transfer Control Protocol/Internetwork Protocol (TCP/IP) was created as a new communication protocol.
This allowed various types of computers on various networks to "speak" to one another. On January 1, 1983, ARPANET and the Defense Data Network switched to the TCP/IP standard, resulting in the birth of the Internet. A universal language could now connect all networks.
Key takeaway
In the 1960s, the Internet was created as a means for government researchers to communicate information.
In the 1960s, computers were enormous and stationary, and in order to access information stored on them, one had to either travel to the computer's location or have magnetic computer tapes transported through the mail system.
Simple Mail Transfer Protocol (SMTP)
E-mail system is implemented with the help of Message Transfer Agents (MTA). There are normally two MTAs in each mailing system. One for sending e-mails and another for receiving e-mails. The formal protocol that defines the MTA client and server in the internet is called Simple Mail Transfer Protocol (SMTP).
Fig shows the range of SMTP protocol.
By referring the above diagram, we can say that SMTP is used two times. That is between the sender and sender’s mail server and between the sender’s mail server and receiver’s mail server. Another protocol is used between the receiver’s mail server and receiver.
SMTP simply defines how commands and responses must be sent back and forth.
SMTP is a simple ASCII protocol
It establishes a TCP connection between a sender and port number 25 of the receiver. No checksums are generally required because TCP provides a reliable byte stream. After exchanging all the e-mail, the connection is released.
Commands and Responses
SMTP uses commands and responses to transfer messages between an MTA client and MTA server.
Each command or reply is terminated by a two-character (carriage return and line feed) end-of-line token.
Fig 3: Commands and Responses
Commands
Client sends commands to the server. SMTP defines 14 commands. Out of that first 5 commands are mandatory; every implementation must support these commands.
The next three commands are often used and are highly recommended. Last six commands are hardly used.
Following table shows FTP commands.
Table:
Keyword | Description |
HELO | Used by the client to identify itself. The argument is domain name of the client host. The format is: HELO: mail.viit.ac.in |
MAIL FROM | Used by the client to identify the sender of the message. The argument is email address of the sender. The format is MAIL FROM: amol.dhumane@gmail.com |
RCPT TO | Used by the client to identify the intended recipient of the message. The argument is the email address of the recipient. The format is: RCPT TO: ashwini.dhumane@yahoo.co.in |
DATA | This command is used to send the actual message. The lines following DATA command are treated as mail message. The format is: DATA There is an important meeting on this Sunday. So please be present for it. Regards; Nitin Sakhare |
QUIT | It terminates the message. The format is: QUIT |
RSET | It aborts the current email transaction. The stored information of the sender and receiver is deleted after executing the command. The connection gets reset. The format is: RSET |
VRFY | This command is used to verify the address of the recipient. In this sender asks the receiver to confirm that a name identifies a valid recipient. Its format is: VRFY: sai@puneatoz.net |
NOOP | By using this command, the client checks the status of the recipient. It requires an answer from recipient. Its format is: NOOP |
TURN | It reverses the role of sender and receiver. |
EXPN | It asks the receiving host to expand the mailing list. |
HELP | It sends system specific documentation. The format is: HELP: mail
|
SEND FROM | This command specifies that the mail is to be delivered to the terminal of the recipient, and not the mailbox. If the recipient is not logged in, the mail is bounced back. The argument is the address of the sender. The format is: SEND FROM: amol.dhumane@gmail.com |
SMOL FROM | This command specifies to send the mail to the terminal if possible, otherwise to the mailbox. |
SMAL FROM
FROM | It sends mail to the terminal and mail box. |
SMTP Working
SMTP works in the following three stages:
a) Connection Establishment
b) Message Transfer
c) Connection Termination
These are explained below:
Connection Establishment
Once the TCP connection is made on port no. 25, SMTP server starts the connection phase. This phase involves following three steps which are explained in the Fig.
The server tells the client that it is ready to receive mail by using the code 220. If the server is not ready, it sends code 421 which tells that service is not available.
Fig 4: Connection Establishment
Once the server becomes ready to receive the mails, client sends HELO message to identify itself using the domain name address. This is important step which informs the server of the domain name of the client. Remember that during TCP connection establishment, the sender and receiver know each other through their IP addresses.
Server responds with code 250 which tells that the request command is completed. Message Transfer Once the connection has been established, SMTP server sends messages to SMTP receiver.
The messages are transferred in three stages
- A MAIL command identifies the message originator.
- RCPT command identifies the receiver of the message.
- DATA command transfers the message text.
Connection Closing
After the message is transferred successfully, the client terminates the connection. The connection is terminated in two steps The client sends the quit command.
The server responds with code 221 or some other appropriate code. After the connection termination phase, the TCP connection must be closed.
MIME Short for Multipurpose Internet Mail Extensions, a specification for formatting non-ASCII messages so that they can be sent over the Internet.
Many e-mail clients now support MIME, which enables them to send and receive graphics, audio, and video files via the Internet mail system. In addition, MIME supports messages in character sets other than ASCII.
There are many predefined MIME types, such as GIF graphics files and PostScript files. It is also possible to define your own MIME types.
In addition to e-mail applications, Web browsers also support various MIME types. This enables the browser to display or output files that are not in HTML format.
POP
Post Office Protocol, version 3 (POP3) is simple and feature-limited. The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
If the user wants to download e-mails from the mailbox on the mail server, mail access begins with the client. On TCP port 110, the client opens a connection to the server. In order to reach the mailbox, it then sends the user name and password. The user will then, one by one, list and retrieve the mail messages.
There are two modes for POP3: the delete mode and the hold mode. In the delete mode, after each retrieval, the mail is removed from the mailbox. In keep mode, after retrieval, the mail stays in the mailbox. When the user is operating on their permanent device, the delete mode is usually used and after reading or replying, the received mail can be saved and sorted. Normally, the keep mode is used when the user accesses her mail away from her main computer (e.g., a laptop). For later retrieval and organisation, the mail is read but kept in the system.
In some aspects, POP3 is deficient. It does not allow the user to arrange his mail on the server; it is impossible for the user to have multiple folders on the server. (The user will build directories on their own computer, of course.)
Fig 5: Command and response of POP3
Advantages of POP3
- As they are already saved on our PC, it provides easy and simple access to the emails.
- The size of the email that we receive or send has no limit.
- When all emails are saved on the local computer, it takes less server storage space.
- The maximum size of a mailbox is available, but the size of the hard disc is limited.
- It is a straightforward protocol, so it is one of the most common protocols used today.
- Configuring and using it is simple.
Disadvantages of POP3
- By default, if the emails are downloaded from the server, all the emails are deleted from the server. Mails will also not be accessed from other computers unless they are programmed to leave a mail copy on the server.
- It can be tough to move the mail folder from the local computer to another machine.
- As all of the attachments are placed on your local computer, if the virus scanner does not scan them, there is a high chance of a virus attack. Virus attacks can destroy your machine.
- There could also be corruption in the email folder that is downloaded from the mail server.
- Mails are saved on a local server, so the email folder can be accessed by someone who is sitting on your machine.
Key takeaway:
● Post Office Protocol, version 3 is simple and feature-limited.
● The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
● In order to reach the mailbox, it then sends the user name and password.
IMAP
Internet Message Access Protocol (IMAP) is an acronym for Internet Message Access Protocol. It's an application layer protocol that allows you to receive emails from a mail server. POP3 is one of the most widely used protocols for retrieving emails.
The client/server model is also used. On the one hand, we have an IMAP client, which is a computer programme. On the other hand, we have an IMAP server, which is likewise a computer-based operation. The two computers are linked through a network.
Because the IMAP protocol is based on the TCP/IP transport layer, it makes use of the protocol's dependability implicitly. The IMAP server listens to port 143 by default whenever a TCP connection is established between the IMAP client and the IMAP server, although this port number can be altered.
IMAP is configured to use two ports by default:
● Port 143: It is a non-encrypted IMAP port.
● Port 993: This port is used when IMAP client wants to connect through IMAP securely.
IMAP History and Standards
IMAP version 2 was the first version of IMAP to be formally documented as an internet standard in RFC 1064, which was published in July 1988. It was modified in August 1990, with the same version, in RFC 1176. As a result, they created IMAP3, a new version 3 document. In February 1991, the RFC 1203 was published. However, because IMAP3 was never embraced by the market, users continued to use IMAP2. IMAPbis, a protocol extension, was later built to add support for Multipurpose Internet Mail Extensions (MIME) to IMAP. Because of MIME's utility, this was a significant advance.
IMAPbis was never published as an RFC, despite this. This could be due to issues with the IMAP3 protocol. IMAP version 4, or IMAP4, was released in two RFCs in December 1994: RFC 1730, which described the basic protocol, and RFC 1731, which described the authentication mechanism for IMAP 4. IMAP 4 is the most recent and extensively used version of IMAP. It is still being developed, and the most recent version is known as IMAP4rev1 and is defined in RFC 2060. RFC 3501 is the most recent revision.
IMAP Features
IMAP was created for a specific purpose: to give users more flexibility in how they access their inbox. It can function in any of the three modes: online, offline, or disconnected. The offline and disconnected modes are of particular importance to most protocol users.
An IMAP protocol has the following characteristics:
● Access and retrieve mail from a distant server: The user can access and retrieve mail from a remote server while keeping the messages there.
● Set message flags: The user can keep track of which messages he has already viewed by setting message flags.
● Manage multiple mailboxes: The user has the ability to manage several mailboxes and transfer messages between them. For those working on numerous projects, the user can categorise them into various categories.
● Determine information prior to downloading: Before downloading the mail from the mail server, it decides whether to retrieve or not.
● Downloads a portion of a message: It allows you to download a component of a message, such as a single body part from the mime-multi part. This is useful when a message's short-text element contains huge multimedia files.
● Search: Users can conduct a search for the contents of emails.
● Check email-header: Examine the email header: Before downloading, users can check the email header.
Advantages
The following are some of the benefits of IMAP:
● It enables us to compose email messages from any location and on as many different devices as we like.
● Only when we click on a message can it be downloaded. As a result, we don't have to wait for the server to download all of our new messages before we can view them.
● With IMAP, attachments are not immediately downloaded. As a result, you can check your messages much faster and have more control over which attachments are accessed.
● IMAP, like the Post Office Protocol, can be utilised offline (POP).
● It allows you to delete messages, search for keywords in the body of emails, create and manage multiple mailboxes or folders, and display the headers of emails for quick visual searches.
Key takeaway
Post Office Protocol, version 3 (POP3) is simple and feature-limited. The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
Internet Message Access Protocol (IMAP) is an acronym for Internet Message Access Protocol. It's an application layer protocol that allows you to receive emails from a mail server.
Web browsers are programmes that are installed on your computer. A web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla Firefox, is required to access the Internet.
Currently, you must navigate through our website tutorialspoint.com using any type of Web browser. Web browsing or web surfing is the process of navigating through pages of information on the Internet.
There are four major web browsers: Internet Explorer, Firefox, Netscape, and Safari, but there are several others. Complete Browser Statistics may be of interest to you. Now we'll take a closer look at these browsers.
We should aim to make a site compatible with as many browsers as feasible when developing it. Especially sites should be adaptable to main browsers like Explorer, Firefox, Chrome, Netscape, Opera, and Safari.
Internet Explorer
Microsoft's Internet Explorer (IE) is a software product. This is the most widely used web browser on the planet. This was debuted in 1995 in conjunction with the release of Windows 95, and it surpassed Netscape in popularity in 1998.
Internet Explorer (also known as IE or MSIE) is a free web browser that allows users to view web pages on the internet. It can also be used to access online banking, internet marketing, listen to and watch streaming videos, and many other things. Microsoft first released it in 1995. It was created in response to Netscape Navigator, the first geographical browser.
For many years, from 1999 to 2012, Microsoft Internet Explorer was the most used web browser, surpassing Netscape Navigator. Network file sharing, multiple internet connections, active Scripting, and security settings are all included.
Google Chrome
Google created this web browser, and the beta version was published on September 2, 2008 for Microsoft Windows. Chrome is now one of the most popular web browsers, with a global market share of more than 50%.
Google Chrome is the most popular open-source internet browser for accessing information on the World Wide Web. It was released on December 11, 2008, by Google for Windows, Linux, Mac OS X, Android, and iOS users. It provides Web security through a sandboxing-based technique. It also adheres to web standards such as HTML5 and CSS (cascading style sheet).
Google Chrome was the first online browser to integrate the search box and address bar, a feature that was quickly replicated by other competitors. Google launched the Chrome Web Store in 2010, allowing users to purchase and install Web-based applications.
Mozilla Firefox
Mozilla has created a new browser called Firefox. It was first introduced in 2004 and has since evolved to become the Internet's second most used browser.
Mozilla Firefox is an open-source web browser that allows users to access information on the Internet. Firefox, the popular Web browser, has a simpler user interface and better download speeds than Internet Explorer. To translate web pages, it employs the Gecko layout engine, which follows current and predicted web standards.
Firefox was popular as a replacement for Internet Explorer 6.0 because it protected users from spyware and harmful websites. After Google Chrome, Apple Safari, and UC Browser, it was the fourth most popular web browser in 2017.
Safari
Safari is an Apple Inc. Web browser that comes standard with Mac OS X. It was originally made available to the public as a public beta in January 2003. Safari offers excellent compatibility for modern technologies like as XHTML and CSS2.
Safari is a web browser for the iPhone, iPad, and iPod Touch, as well as the Macintosh and Windows operating systems. Apple, Inc. Released it on June 30, 2003. It is the primary browser for Apple's operating systems, such as OS X for MacBook and Mac computers and iOS for iPad and iPhone smartphones and tablets. After Microsoft Internet Explorer, Mozilla Firefox, and Google Chrome, it is the fourth most used browser. It makes use of the WebKit engine, which handles font rendering, graphics display, page layout, and JavaScript execution.
Opera
Opera is a full-featured browser that is smaller and faster than most other browsers. With a keyboard interface, numerous windows, zoom functions, and more, it's quick and easy to use. There are Java and non-Java versions available. Ideal for novices to the Internet, schoolchildren, the handicapped, and as a CD-Rom and kiosk front-end.
Konqueror
Konqueror is an HTML 4.01 compliant web browser that also supports Java applets, JavaScript, CSS 1, CSS 2.1, and Netscape plugins. This programme functions as a file manager and offers basic file management on local UNIX filesystems, ranging from simple cut/copy/paste operations to advanced remote and local network file browsing.
Lynx
Lynx is a full-featured Web browser for Unix, VMS, and other platforms with cursor-addressable character-cell terminals or emulators.
Key takeaway
Web browsers are programmes that are installed on your computer. A web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla Firefox, is required to access the Internet.
What is E-mail?
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments. Generally, it is information that is stored on a computer sent through a network to a specified individual or group of individuals.
Email messages are conveyed through email servers; it uses multiple protocols within the TCP/IP suite. For example, SMTP is a protocol, stands for simple mail transfer protocol and used to send messages whereas other protocols IMAP or POP are used to retrieve messages from a mail server. If you want to login to your mail account, you just need to enter a valid email address, password, and the mail servers used to send and receive messages.
Although most of the webmail servers automatically configure your mail account, therefore, you only required to enter your email address and password. However, you may need to manually configure each account if you use an email client like Microsoft Outlook or Apple Mail. In addition, to enter the email address and password, you may also need to enter incoming and outgoing mail servers and the correct port numbers for each one.
Email messages include three components, which are as follows:
● Message envelope: It depicts the email's electronic format.
● Message header: It contains email subject line and sender/recipient information.
● Message body: It comprises images, text, and other file attachments.
The email was developed to support rich text with custom formatting, and the original email standard is only capable of supporting plain text messages. In modern times, email supports HTML (Hypertext markup language), which makes it capable of emails to support the same formatting as websites. The email that supports HTML can contain links, images, CSS layouts, and also can send files or "email attachments" along with messages. Most of the mail servers enable users to send several attachments with each message. The attachments were typically limited to one megabyte in the early days of email. Still, nowadays, many mail servers are able to support email attachments of 20 megabytes or more in size.
In 1971, as a test e-mail message, Ray Tomlinson sent the first e-mail to himself. This email was contained the text "something like QWERTYUIOP." However, the e-mail message was still transmitted through ARPANET, despite sending the e-mail to himself. Most of the electronic mail was being sent as compared to postal mail till 1996.
Differences between email and webmail
The term email is commonly used to describe both browser-based electronic mail and non-browser-based electronic mail today. The AOL and Gmail are browser-based electronic mails, whereas Outlook for Office 365 is non-browser-based electronic mail. However, to define email, a difference was earlier made as a non-browser program that needed a dedicated client and email server. The non-browser emails offered some advantages, which are enhanced security, integration with corporate software platforms, and lack of advertisements.
Uses of email
Email can be used in different ways: it can be used to communicate either within an organization or personally, including between two people or a large group of people. Most people get benefit from communicating by email with colleagues or friends or individuals or small groups. It allows you to communicate with others around the world and send and receive images, documents, links, and other attachments. Additionally, it offers benefit users to communicate with the flexibility on their own schedule.
There is another benefit of using email; if you use it to communicate between two people or small groups that will beneficial to remind participants of approaching due dates and time-sensitive activities and send professional follow-up emails after appointments. Users can also use the email to quickly remind all upcoming events or inform the group of a time change. Furthermore, it can be used by companies or organizations to convey information to large numbers of employees or customers. Mainly, email is used for newsletters, where mailing list subscribers are sent email marketing campaigns directly and promoted content from a company.
Email can also be used to move a latent sale into a completed purchase or turn leads into paying customers. For example, a company may create an email that is used to send emails automatically to online customers who contain products in their shopping cart. This email can help to remind consumers that they have items in their cart and stimulate them to purchase those items before the items run out of stock. Also, emails are used to get reviews by customers after making a purchase. They can survey by including a question to review the quality of service.
History of E-mail
As compared to ARPANet or the Internet, email is much older. The early email was just a small advance, which is known as a file directory in nowadays. It was used to just put a message in other user's directory in the place where they were able to see the message by logging in. For example, the same as leaving a note on someone's desk. Possibly MAILBOX was used at Massachusetts Institute of Technology, which was the first email system of this type from 1965. For sending messages on the same computer, another early program was SNDMSG.
Users were only able to send messages to several users of the same computer through email when the internetworking was not beginning. And, the problem became a little more complex when computers began to talk to each other over networks, we required to put a message in an envelope and address it for the destination.
Later in 1972, Ray Tomlinson invented email to remove some difficulties. Tomlinson worked (Like many of the Internet inventors) for Newman and Bolt Beranek as an ARPANET contractor. To denote sending messages from one computer to another, he picked up the @ symbol from the keyboard. Then, it became easy to send a message to another with the help of Internet standards; they were only required to propose name-of-the-user@name-of-the-computer. One of the first users of the new system was Internet pioneer Jon Postel. Also, describing as a "nice hack," credited goes to Jon Postel.
Although the World Wide Web offers many services, email is the most widely used facility and remains the most important application of the Internet. On the international level, over 600 million people use email. There were hundreds of email users by 1974, as ARPANET ultimately encouraged it. Furthermore, email caused a radical shift in Arpa's purpose, as it became the savior of Arpanet.
From there were rapid developments in the field of the email system. A big enhancement was to sort emails; some email folders for his boss were invented by Larry Roberts. To organize an email, John Vittal developed some software in 1976. By 1976 commercial packages began to appear, and email had really taken off. The email had changed people and took them from Arpanet to the Internet. Here was appeared some interesting features that ordinary people all over the world wanted to use.
Some years later, Ray Tomlinson observed about email. As compared to the previous one, any single development is stepping rapidly and nearly followed by the next. I think that all the developments would take a big revolution.
When personal computers came on the scene, the offline reader was one of the first new developments. Then, email users became able to store their email on their own personal computers with the help of offline reader and read it. Also, without actually being connected to the network, they were able to prepare replies like Microsoft Outlook can do today. In parts of the world, this was specifically useful for people where the telephone was expensive as compared to the email system.
Without being connected to a telephone, it was able to prepare a reply with connection charges of many dollars a minute and then get on the network to send it. Also, it was useful as the offline mode allowed for more simple user interfaces. In this modern time of very few standards being connected directly to the host email system often resulted in no capacity for text to wrap around on the screen of the user's computer, and backspace keys and delete keys may not work and other such annoyances. Offline readers helped out more to overcome these kinds of difficulties.
The SMTP (simple mail transfer protocol) was the first important email standard. It was a fairly naïve protocol that is still in use. And, it was made in terms of no attempt to find the person who sent a message that was the right or not what they claimed to be. In the email addresses, fraudulent was very easy and is still available. Later, these basic flaws were used in the protocol by security frauds, worms and viruses, and spammers forging identities. From 2004, some of these problems are still being processed for a solution.
But as developed email system offered some important features that helped out people to understand easily about email. In 1988, Steve Dorner developed Eudora that was one of the first good commercial systems. But it did not appear for a long time after Pegasus mail come. Servers began to appear as a standard when Internet standards POP (Post office protocol) for email began to mature. Each server was a little different before standard post office protocol (POP). POP was an important standard that allowed users to work together.
Individual dialup users were required to charges for an email per-minute in those days. Also, on the Internet, email and email discussion groups were the main uses for most people. There were several issues on a wide variety of subjects; they became USENET as a body of newsgroups.
With the World Wide Web (WWW), email became available with a simple user interface that was offered by providers like Hotmail and Yahoo. And, users did not require to pay any charges on these platforms. Now everyone wanted at least one email address as it is much simple and affordable, and the medium was adopted by millions of people.
Internet Service Providers (ISPs) started to connect people with each other all over the world by the 1980s. Also, by 1993 the use of the Internet was becoming widespread, and the word electronic mail was replaced by email.
Today, email has become a primary platform to communicate with people all over the world. There are continuing updates to the system with so many people using email for communication. Although email has some security issues, there have been laws passed to prevent the spread of junk email over the years.
Advantages of Email
There are many advantages of email, which are as follows:
● Cost-effective: Email is a very cost-effective service to communicate with others as there are several email services available to individuals and organizations for free of cost. Once a user is online, it does not include any additional charge for the services.
● Email offers users the benefit of accessing email from anywhere at any time if they have an Internet connection.
● Email offers you an incurable communication process, which enables you to send a response at a convenient time. Also, it offers users a better option to communicate easily regardless of different schedules users.
● Speed and simplicity: Email can be composed very easily with the correct information and contacts. Also, minimum lag time, it can be exchanged quickly.
● Mass sending: You can send a message easily to large numbers of people through email.
● Email exchanges can be saved for future retrieval, which allows users to keep important conversations or confirmations in their records and can be searched and retrieved when they needed quickly.
● Email provides a simple user interface and enables users to categorize and filter their messages. This can help you recognize unwanted emails like junk and spam mail. Also, users can find specific messages easily when they are needed.
● As compared to traditional posts, emails are delivered extremely fast.
● Email is beneficial for the planet, as it is paperless. It reduces the cost of paper and helps to save the environment by reducing paper usage.
● It also offers a benefit to attaching the original message at the time you reply to an email. This is beneficial when you get hundreds of emails a day, and the recipient knows what you are talking about.
● Furthermore, emails are beneficial for advertising products. As email is a form of communication, organizations or companies can interact with a lot of people and inform them in a short time.
Disadvantages of Email
● Impersonal: As compared to other forms of communication, emails are less personal. For example, when you talk to anyone over the phone or meeting face to face is more appropriate for communicating than email.
● Misunderstandings: As email includes only text, and there is no tone of voice or body language to provide context. Therefore, misunderstandings can occur easily with email. If someone sends a joke on email, it can be taken seriously. Also, well-meaning information can be quickly typed as rude or aggressive that can impact wrong. Additionally, if someone types with short abbreviations and descriptions to send content on the email, it can easily be misinterpreted.
● Malicious Use: As email can be sent by anyone if they have an only email address. Sometimes, an unauthorized person can send you mail, which can be harmful in terms of stealing your personal information. Thus, they can also use email to spread gossip or false information.
● Accidents Will Happen: With email, you can make fatal mistakes by clicking the wrong button in a hurry. For instance, instead of sending it to a single person, you can accidentally send sensitive information to a large group of people. Thus, the information can be disclosed, when you have clicked the wrong name in an address list. Therefore, it can be harmful and generate big trouble in the workplace.
● Spam: Although in recent days, the features of email have been improved, there are still big issues with unsolicited advertising arriving and spam through email. It can easily become overwhelming and takes time and energy to control.
● Information Overload: As it is very easy to send email to many people at a time, which can create information overload. In many modern workplaces, it is a major problem where it is required to move a lot of information and impossible to tell if an email is important. And, email needs organization and upkeep. The bad feeling is one of the other problems with email when you returned from vacation and found hundreds of unopened emails in your inbox.
● Viruses: Although there are many ways to travel viruses in the devices, email is one of the common ways to enter viruses and infect devices. Sometimes when you get a mail, it might be the virus come with an attached document. And, the virus can infect the system when you click on the email and open the attached link. Furthermore, an anonymous person or a trusted friend or contact can send infected emails.
● Pressure to Respond: If you get emails and you do not answer them, the sender can get annoyed and think you are ignoring them. Thus, this can be a reason to make pressure on your put to keep opening emails and then respond in some way.
● Time Consuming: When you get an email and read, write, and respond to emails that can take up vast amounts of time and energy. Many modern workers spend their most time with emails, which may be caused to take more time to complete work.
● Overlong Messages: Generally, email is a source of communication with the intention of brief messages. There are some people who write overlong messages that can take much time than required.
● Insecure: There are many hackers available that want to gain your important information, so email is a common source to seek sensitive data, such as political, financial, documents, or personal messages. In recent times, there have various high-profile cases occurred that shown how email is insecure about information theft.
Different types of Email
There are many types of email; such are as follows:
● Newsletters: It is studying by Clutch, the newsletter is the most common type of email that are routinely sent to all mailing list subscribers, either daily, weekly, or monthly. These emails often contain from the blog or website, links curated from other sources, and selected content that the company has recently published. Typically, Newsletter emails are sent on a consistent schedule, and they offer businesses the option to convey important information to their client through a single source. Newsletters might also incorporate upcoming events or new, webinars from the company, or other updates.
● Lead Nurturing: Lead-nurturing emails are a series of related emails that marketers use to take users on a journey that may impact their buying behavior. These emails are typically sent over a period of several days or weeks. Lead-nurturing emails are also known as trigger campaigns, which are used for solutions in an attempt to move any prospective sale into a completed purchase and educate potential buyers on the services. These emails are not only helpful for converting emails but also drive engagement. Furthermore, lead-nurturing emails are initiated by a potential buyer taking initial action, such as clicking links on a promotional email or downloading a free sample.
● Promotional emails: It is the most common type of B2B (Business to Business) email, which is used to inform the email list of your new or existing products or services. These types of emails contain creating new or repeat customers, speeding up the buying process, or encouraging contacts to take some type of action. It provides some critical benefits to buyers, such as a free month of service, reduced or omitted fees for managed services, or percentage off the purchase price.
● Standalone Emails: These emails are popular like newsletters emails, but they contain a limitation. If you want to send an email with multiple links or blurbs, your main call-to-action can weaken. Your subscriber may skip your email and move on, as they may click on the first link or two in your email but may not come back to the others.
● Onboarding emails: An onboarding email is a message that is used to strengthen customer loyalty, also known as post-sale emails. These emails receive users right after subscription. The onboarding emails are sent to buyers to familiarize and educate them about how to use a product effectively. Additionally, when clients faced with large-scale service deployments, these emails help them facilitate user adoption.
● Transactional: These emails are related to account activity or a commercial transaction and sent from one sender to one recipient. Some examples of transactional email are purchase confirmations, password reminder emails, and personalized product notifications. These emails are used when you have any kind of e-commerce component to your business. As compared to any other type of email, the transactional email messages have 8x the opens and clicks.
● Plain-Text Emails: It is a simple email that does not include images or graphics and no formatting; it only contains the text. These types of emails may worth it if you try to only ever send fancy formatted emails, text-only messages. According to HubSpot, although people prefer fully designed emails with various images, plain text emails with less HTML won out in every A/B test. In fact, HTML emails contain lower open and click-through rates, and plain text emails can be great for blog content, event invitations, and survey or feedback requests. Even if you do not send plainer emails, but you can boost your open and click through rates by simplifying your emails and including fewer images.
● Welcome emails: It is a type of B2B email and common parts of onboarding emails that help users get acquainted with the brand. These emails can improve subscriber constancy as they include additional information, which helps to the new subscriber in terms of a business objective. Generally, welcome emails are sent to buyers who got a subscription to a business's opt-in activities, such as a blog, mailing list, or webinar. Also, these emails can help businesses to build a better relationship between customers.
What can be sent in an e-mail?
An email is a platform that enables users to communicate with each other. It allows users to send text messages, including a file or other data on the e-mail all over the world. It is also possible to attach a picture, word processor document, PDF, program, movie, or any file stored on your computer in an e-mail. However, due to some security issues, it may not be possible to send certain types of files on the email; they need some additional steps. For example, the .exe file can be blocked by many companies from being sent over the email, and you will need to compress the file into a .zip file format. Additionally, you may be unable to send any large files or programs from being sent over e-mail as most e-mail providers have file size restrictions.
What should be write e-mail?
You can use any word email or e-mail according to the style guide you are following as both are valid and have the same meaning. However, the e-mail word has a hyphen and is a compound noun that describes "electronic" and "mail."
What makes a valid e-mail address?
Users need to follow the various rule that is given below to make valid email address:
● A username followed by @ (the at sign) is most important for an email address, which is followed by the domain name with a domain suffix. Hence, an e-mail must have a username.
● The domain name cannot be longer than 254 characters, and the username cannot be longer than 64 characters long.
● An email must have only one @ sign.
● An email should not have space and special characters like \ [ ] ( ) , : ; < >. Sometimes, few symbols such as backslash, space, and quotation mark work must be preceded with a forward slash. But these characters are not allowed by some email providers.
● In the email, the email address and username cannot start or end with a period.
● The two or more successive periods are not allowed in the email.
E-mail Message Components
E-mail message comprises of different components: E-mail Header, Greeting, Text, and Signature. These components are described in the following diagram:
E-mail Header
The first five lines of an E-mail message is called E-mail header. The header part comprises of following fields:
a) From
b) Date
c) To
d) Subject
e) CC
f) BCC
From
The From field indicates the sender’s address i.e. who sent the e-mail.
Date
The Date field indicates the date when the e-mail was sent.
To
The To field indicates the recipient’s address i.e. to whom the e-mail is sent.
Subject
The Subject field indicates the purpose of e-mail. It should be precise and to the point.
CC
CC stands for Carbon copy. It includes those recipient addresses whom we want to keep informed but not exactly the intended recipient.
BCC
BCC stands for Black Carbon Copy. It is used when we do not want one or more of the recipients to know that someone else was copied on the message.
Greeting
Greeting is the opening of the actual message. Eg. Hi Sir or Hi Guys etc.
Text
It represents the actual content of the message.
Signature
This is the final part of an e-mail message. It includes Name of Sender, Address, and Contact Number.
Key takeaway
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments.
Compose e-mail, Send e-mail
To write and send e-mail with data and messages, do the following:
Step 1: In order to create a new e-mail and send data through it a user has to click on “Compose” option available at the top of inbox option as shown in the picture below.
Step 2: A “New Message” box will appear as you can see in the below picture asking you to enter details in order to create a new e-mail message.
Note: New messages in an e-mail are stored in Inbox folder of the e-mail and all saved messages appears in draft folder of your e-mail.
Here, In the New Message box, you will see the following things:
● To: Mail ID of the recipient
● Cc: To send a Carbon copy i.e., send this mail to several people at the same time and also show everyone the email id’s of all the other people who have received it.
● Bcc: To send a Blind Carbon copy i.e., send this mail to several people at the same time but without showing the person in Bcc list about who else has received this mail.
● Subject: Is the main part which will be shown first to the person receiving the mail. It should be short and relevant to your mail and must tell the reason for your e-mail.
● Body: The body of the e-mail is the blank white part where the user can type his message and can even customise it. In above picture we have written “Hello” to show the body of this e-mail.
● Insert Bar: This bar is available at the bottom of the e-mail compose window. It includes various options to insert document, links, emoji’s, Google drive files, images, signature, delete the email etc.
User simply has to click on one of these options to insert an object and a new window will appear that will ask you about the file location which you want to insert into this mail. After locating the file just click on insert and the file will start uploading to this e-mail, once it is done it can be seen in the e-mail window. You can also open or remove the file from the e-mail using the options available alongside your uploaded file.
Delete button: There is a dustbin icon at the end of this email which lets a user to delete or discard there typed mail. Once discarded the mail cannot be retrieved.
Note: The close option is also available at the top of the window but that option will not delete the e-mail you have typed it simply closes the window and save the typed e-mail in drafts folder for future editing or usage purpose.
Step 3: The send icon is the blue one which is used to send the e-mail once it is composed. All the files inserted along with the text will be sent to the e-mail addresses once the user clicks on this button.
Note: There are various other options available under this Mail compose window such as Print, Schedule send, Minimise and Maximise the window which can be used for better e-mail experience of the user.
File attachment
An email attachment is a file that is sent together with an email from one person to another. Its objective is usually to increase the value or advantage that the email provides to the reader by including additional content that you can't express in the email body. The attachment can be in a variety of formats and sizes, with huge text files, various sorts of documents, spreadsheets, scanned files, forms, photos, and videos being the most common.
What is the best way to write an email with an attachment?
When preparing and sending an email with an attachment, keep these five procedures in mind:
1. Determine what files you wish to send
You should know exactly what file you are intending to transmit and where it is on your device's hard disc or memory drive before sending the email. Knowing what file(s) you're about to send is vital since you'll need to mention them in the email's text, and knowing where they are can help you discover and attach them quickly before sending the email.
2. Write the email's subject line
The subject line of the email is the next step. Because many potential recipients may ignore emails with attachments unless they know what they are, the subject of the email should indicate that it has one or more attachments and provide information about what they are.
3. Compose the email's body
If the attachments are the primary reason for sending an email, the body of the message can just be a brief summary of the files attached. If the attached files are only a small portion of what the email is trying to say, they should be referenced in the body, preferably with a short line that explains what they are. It's not a good idea to send an email with attachments but no text since the recipient or their email provider might think it's spam.
4. Attach the files
Attaching the relevant file or files to the email is the final step before sending it. This stage, however, can happen at any point during the writing and sending procedure. Many senders prefer to attach the files before drafting the email because it reduces the chances of forgetting to do so.
5. Review and send the email
After you've written the subject and content of the email and attached the attachments, you can proofread it before sending it to the recipient.
Attach a file
● Go to Gmail on your PC.
● Click the Compose button.
● Click Attach Attach at the bottom of the page.
● Select the files you'd like to upload.
● Click the Open button.
Remove an attachment
You can remove an attachment after it has been added. Tap Close Close to the right of the attachment name.
Send attachments with confidential mode
- Go to Gmail on your PC.
- Click the Compose button.
- Attach the file by clicking on it.
- Select the files you'd like to upload.
- Turn on confidential mode in the lower right corner of the window. Turn on the private mode.
Tip: To edit an email that has already been set to confidential mode, go to the bottom of the email and select Edit.
6. Set a passcode and an expiration date. Both the message text and any attachments are affected by these parameters.
● If "No SMS passcode" is selected, receivers who use the Gmail app will be able to open it directly. A passcode will be emailed to those who do not use Gmail.
● If you select "SMS passcode," recipients will receive a text message with a passcode. Make sure the recipient's phone number, not your own, is entered.
7. Save the file.
Uploading & downloading
Fig 6: Uploading and downloading
Uploading
If a website accepts file uploads, it will feature an upload tool to assist with the process. This method is handled differently by each site, however we'll provide some instances. The site's help sections will usually assist you through the upload process.
Many websites feature a button that opens a dialogue box when you click it. Facebook, for example, includes a camera icon that starts the uploading process.
You'll be prompted to choose a file in a dialogue window. Navigate to your file's location, pick it, and then click the Open button. Following that, a progress bar will show on the page, tracking the upload process.
A drag-and-drop interface is available on some websites. When logged in to Dropbox, for example, you can drag and drop files from a folder on your computer into the browser window.
Downloading
When you download a file, you usually begin the process by clicking on a link to that file.
When you click the link, your browser should prompt you to choose one of two download options.
● Open with will download the file and open it in the given programme right away.
● It will be downloaded and saved to your hard drive when you click Save File.
The download will commence in either case as you click OK. Your browser will show you how far along the download is and how much time is left.
When the download is finished, the file will either be saved to your computer or opened in the programme you chose. Check try our Finding Your Downloads lesson if you're having problems finding the file after you've downloaded it.
● When you click the link to a file, some browsers don't always start the download process. In these circumstances, right-click the link, choose Save Link As, and then choose a location to save the file.
References:
- Operating System Concepts – Silberschatz, Galvin and Gagne
- Operating System By Godbole
- Linux Bible 9th Edition by Christoper Negus ISBN :978-1-118-99987-5
- Ball, Using Linux, PHI, 1998. ISBN-10: 0789716232
Unit - 2
Shell Programming and Internet
Shell Scripting is a free and open-source programming software that runs on the Unix/Linux shell. Shell Scripting is a program that allows you to write a series of commands to be executed by the shell. It can condense long and repetitive command sequences into a single, simple script that can be saved and executed at any time, reducing programming time.
Shells such as bash and korn in Linux support programming constructs that can be stored as scripts. Many Linux commands are scripted as a result of these scripts being shell commands.
To understand how their servers and applications are started, updated, maintained, or disabled, and to understand how a user interface is designed, a system administrator should have a basic understanding of scripting.
Shells are usually interactive, which means they accept user commands as input and execute them. However, there are times when we need to run a series of commands on a regular basis, and we must type all commands into the terminal each time.
We can write these commands in a file and execute them in shell to avoid this repetitive work because shell can take commands from files as input. Shell Scripts or Shell Programs are the names given to these files. The batch file in MS-DOS is identical to shell scripts. Each shell script has a.sh file extension, such as myscript.sh.
Shell scripts use the same syntax as other programming languages. It will be very simple to get started if you have previous experience with any programming language such as Python, C/C++, or others.
The following elements make up a shell script:
● Shell Keywords – if, else, break etc.
● Shell commands – cd, ls, echo, pwd, touch etc.
● Functions
● Control flow – if..then..else, case and shell loops etc.
Key takeaway
Shell Scripting is a free and open-source programming software that runs on the Unix/Linux shell. Shell Scripting is a program that allows you to write a series of commands to be executed by the shell.
Normally, the shell runs the commands in a script in the order they are written in the text, one after the other.
Frequently, though, you will want to alter the way commands are executed.
Depending on the circumstances, you may want to run one command over and over, or you may want to run a command several times.
The shell provides a number of control mechanisms that can be used to change the order in which commands are executed.
There are two different types of selection mechanisms that allow you to choose between different commands:
● if/then/elif/else/fi
● case
The if statement
The if statement allows you to decide whether to run a command (or a group of commands) based on a condition.
The most basic version of this structure is as follows:
If conditional expression
Then
Command(s)
Fi
When the shell comes across a structure like this, it tests to see if the conditional expression is valid first.
If this is the case, the shell executes any commands found between the then and the fi (which is just if spelled backwards).
The shell skips the commands between then and fi if the conditional expression is false.
Example:
Here's a shell script that makes use of easy if statements:
#!/bin/sh
Set ‘date‘
If test $1 = Fri
Then
Echo "Thank goodness it’s Friday!
Fi
The test commands
In this conditional expression, we used the test instruction.
The phrase is:
Test $1 = Fri
The test command tests to see if the parameter $1 contains Fri; if it does, the condition is valid, and the message is printed.
The test command may run a number of tests; see the documentation for more details.
Using elif and else
Combining the if statement with the elif (“then if”) and else statements allows one to create even more complex selection structures.
Here's an easy example.
#!/bin/sh
Set ‘date‘
If test $1 = Fri
Then
Echo "Thank goodness it’s Friday!"
Elif test $1 = Sat 11 test $1 = Sun
Then
Echo "You should not be here working."
Echo "Log off and go home."
Else
Echo "It is not yet the weekend."
Echo "Get to work!"
Fi
The case Statement
On certain UNIX systems, the shell offers another selection structure that could be faster than the if argument.
This is the case statement, which takes the following form:
Case word in
Patternl) command(s) ;;
Pattern2) command(s) ;;
...
PatternN) command(s) ;;
Esac
The case statement compares word to pattern1, and if the two are equal, the shell executes the command(s) on the first line.
Otherwise, the shell goes through the remaining patterns one by one until it finds one that fits the expression, at which point it executes the command(s) on that line.
The default value is *.
Example:
Here's an example of a basic shell script that employs case statements:
#!/bin/sh
Set ‘date‘
Case $1 in
Fri) echo "Thank goodness it’s Friday!";;
Sat | Sun) echo "You should not be here working"; echo "Log off and go home!";;
*) echo "It is not yet the weekend."; echo "Get to work!";
Esac
For Loops
We sometimes want to repeat a command (or a set of commands).
Iteration, repetition, or looping are terms used to describe this method.
The for loop is the most common shell repetition structure, and it has the following general form:
For variable in list
Do
Command(s)
Done
Example:
Here's an easy example:
#!/bin/sh
For host in $*
Do
Ping $host
Done
While Loops
The while loop is described as follows:
While condition
Do
Command(s)
Done
The commands between the do and the done are executed as long as the condition is true.
Example:
#!/bin/sh
# Print a message ten times
Count=10
While test $count -gt 0
Do
Echo $*
Count=‘expr $count - 1
Done
Until Loops
The until loop is another form of iteration structure.
It takes the following general form:
Until condition
Do
Command
Done
Unless the condition is valid, this loop continues to execute the command(s) between do and done.
Instead of using while loops, we can rewrite the previous script using an until loop:
#!/bin/sh
# Print a message ten times
Count=10
Until test $count -eq 0
Do
Echo $*
Count=‘expr $count
Done
Conditional Execution
The Exit Code of the first command is used in the following two examples to conditionally execute the second command. The logical AND operator, &&, only runs the second command if the first one was good.
$ gcc myprog.c && a.out
If the first command fails, the logical OR operator || executes the second command.
$ gcc myprog.c || echo compilation failed
Continue statement
The continue statement is identical to the break instruction, except that it only exits the current loop iteration, not the entire loop.
If an error occurs, but you still want to attempt to perform the next iteration of the loop, use this expression.
Syntax:
Continue
The continue instruction, like the break statement, can be given an integer argument to skip commands from nested loops.
Continue n
The nth enclosing loop to proceed from is defined by n.
Example:
The continue statement is used in the following loop, which returns from the continue statement and begins processing the next statement.
#!/bin/sh
NUMS="1 2 3 4 5 6 7"
For NUM in $NUMS
Do
Q=expr $NUM % 2
If [ $Q -eq 0 ]
Then
Echo "Number is an even number!!"
Continue
Fi
Echo "Found odd number"
Done
When you run it, you'll get the following result:
Found odd number
Number is an even number!!
Found odd number
Number is an even number!!
Found odd number
Number is an even number!!
Found odd number
Break statement
Since all of the lines of code up to the break statement have been executed, the break statement is used to end the loop's execution. It then descends to the code following the loop's conclusion.
Syntax:
To get out of a loop, use the break statement below.
Break
This format can also be used to exit a nested loop with the break command -
Break n
The nth enclosing loop to exit from is defined by n.
Example:
Here's a simple example that demonstrates how the loop ends when an equals 5.
#!/bin/sh
a=0
While [ $a -lt 10 ]
Do
Echo $a
If [ $a -eq 5 ]
Then
Break
Fi
a=expr $a + 1
Done
When you run it, you'll get the following result:
0
1
2
3
4
5
Here's a simple nested for loop illustration. If var1 equals 2 and var2 equals 0, this script exits all loops.
#!/bin/sh
For var1 in 1 2 3
Do
For var2 in 0 5
Do
If [ $var1 -eq 2 -a $var2 -eq 0 ]
Then
Break 2
Else
Echo "$var1 $var2"
Fi
Done
Done
When you run it, you'll get the following result. You have a break command with the argument 2 in the inner loop. This means that if a condition is met, you can exit the outer loop and eventually the inner loop as well.
1 0
1 5
The read command in Linux is used to read a line's contents into a variable. For Linux systems, this is a built-in command. As a result, we won't need to install any more software. When writing a bash script, it's a simple tool to utilise to get user input. It's a useful tool, just like the echo command and the positional parameter. It's used to separate the words associated with the shell variable. It is mostly used to receive user input, but it can also be used to implement functions while receiving input.
Syntax:
The read command has the following basic syntax:
Read [options] [name...]
How to use the read command?
With and without arguments, the read command can be used. Let's have a look at how the read command might be used in different situations:
● Default Behaviour
If we run the read command without any arguments, it will accept a line as user input and save it in the 'REPLY' built-in variable. Run the command as follows:
Read
The command above will prompt the user for input. To save the user input, type it in and hit the ENTER key. Execute the command as follows to see the entered content:
Echo $REPLY
The above command will display the 'REPLY' variable's stored input.
● Specify the variables to store the values
We can define the variables that will be used to store the data. If the number of provided variables is less than the number of entered words, all leftover words will be stored in the last variable by default. Consider the command below:
Read var1 var2 var3
● read -p
For the prompt text, the '-p' option is used. It reads the data as well as some hints. This tip text guides us through the process of typing text, such as what to type. Consider the command below:
Read -p " Enter your name: "
The command above will prompt you for your name; type it in. The name will be saved in the variable 'REPLY.' Execute the following command to see the variable value:
Echo " My name is $REPLY"
● read -n
The '-n' option shortens the character length in the entered text. It will not allow you to type more than the number of characters specified. It will automatically cease reading after the maximum number of characters has been reached. Execute the following command to limit the number of characters to six:
Read -n 6 -p " Enter 6 characters only: "
We can't enter more than 6 characters with the instruction above.
● read -s
For security reasons, the '-s' option is utilised. It is used to read sensitive information. The entered text will not appear in the terminal if this option is selected. With this option, we can use additional options. In this option, the characters are read aloud. Its primary function is to read passwords from the keyboard. Consider the command below:
Read -s -p "Enter password: "
The above command will demand for a password, but the password will not be displayed on the terminal when we type it.
Echo statement
In Linux, the echo command is used to display a line of text/string that has been supplied as an argument. This is a built-in command that outputs status text to the screen or a file. It's typically used in shell scripts and batch files.
Syntax:
Echo [option] [string]
Displaying a text/string :
Syntax:
Echo [string]
Example:
Echo -e "World \bis \bBeautiful"
Output
Implementations of the echo command
SymbOS, KolibriOS, HP MPE/iX, ReactOS, Microsoft Windows, IBM OS/2, Digital Research FlexOS, Acorn Computers Panos, Microwave OS-9, Zilog Z80-RIO, MetaComCo TRIPOS, TSC FLEX, Multics, Unix-like, and Unix operating systems all provide the echo command.
Several shells, including Csh-like shells (such as zsh or Bash), Bourne-like shells, COMMAND.COM, and cmd.exe, use the echo command as a built-in command.
The command also exists inside the EFI shell.
Echo Command Options
The echo command has a number of different options. The following alternatives are listed and explained:
1. b: Use this option to remove all spaces from the text/string.
Example
Echo -e "Flowers \bare \bBeautiful"
2.\c: This option is used in conjunction with the '-e' backspace interpreter to suppress the trailing new line and continue without emitting any new lines.
Example
Echo -e "World \cis Beautiful"
3. \n: This option is used to generate a new line, which will be formed from the location where it is used.
Example:
Echo -e "World \nis \nBeautiful"
4. Echo *: This option prints every folder or file in the system. It's the same as the Linux ls command.
Example:
Echo *
5. -n: This option is used to skip echoing new lines at the end.
Example:
Echo -n "World is Beautiful"
6. Print "Hello All!" on the terminal: Use the following command to print the text "Hello All!" on the terminal:
Example:
$ echo "Hello All!"
7. Print specified file types: For example, if we want to print every '.c' file, we can use the command below:
Example:
$ echo *.txt
Text editors are used to build Shell Scripts. Open a text editor program on your Linux system, create a new file, and begin typing a shell script or shell programming. Next, grant the shell permission to execute your shell script, and save your script anywhere the shell can find it.
Let's take a look at how to make a Shell Script:
● Using a vi editor, create a file (or any other editor). .sh is the extension for a script file.
● #! /bin/sh is a good way to start the script.
● Make a program.
● Filename.sh is the name of the script file.
● Type bash filename.sh to run the script.
"#!" is a shebang operator that sends the script to the interpreter's position. The script is guided to the bourne-shell if we use "#! /bin/sh."
Let's make a quick script -
#!/bin/bash
# My first script
Echo "Hello World!"
Fig 1: Steps to create shell scripting in linux
Generating output:
The read command is used in the following script to take input from the keyboard, allocate it to the variable Individual, and finally print it on STDOUT.
#!/bin/sh
# Author: Zara Ali
# Copyright (c) Tutorialspoint.com
# Script follows here:
Echo "What is your name?"
Read PERSON
Echo "Hello, $PERSON"
Output:
Here's an example of the script in action:
$./test.sh
What is your name?
Zara Ali
Hello, Zara Ali
$
Example:
The wc command in Bash is used to count a file's total number of lines, sentences, and characters. To generate the output, this command uses the options -c, -w, and -l, as well as the argument filename. To test the next script, create a text file called fruits.txt with the following details. Text file
Fruits.txt
Mango
Orange
Banana
Grape
Guava
Apple
To count and store the total number of words in the fruits.txt file into a variable, $count words, and print the value using the echo command, run the following commands.
$ count_words=wc -w fruits.txt
$ echo "Total words in fruits.txt is $count_words"
Output:
Key takeaway
Text editors are used to build Shell Scripts. Open a text editor program on your Linux system, create a new file, and begin typing a shell script or shell programming. Next, grant the shell permission to execute your shell script, and save your script anywhere the shell can find it.
Alternative name to internet is either the net or web.
● The internet is also considered a Superhighway for transmitting information.
● It is the largest network in the world that connects hundreds of thousands of individual networks all over the world. The Internet moves your ideas and information from one place to another place.
Fig 2: Internet
How to access the Internet
● The Internet utilizes the TCP/IP protocol and is accessed using a computer modem, broadband network that is connected through an ISP (Internet Service Provider).
● An Internet Service Provider (ISP) is an organization which provides services for accessing and using the internet.
● In the case of broadband, many computers use Wi-Fi to connect to router that is connected to the ISP.
● Many of the institutes, schools and businesses have direct access to the Internet using special high-speed communication lines and equipment.
● Students and employees can access through the organization’s Local Area Networks (LAN) or through their own personal computers.
● As the Internet contains billions of web pages created by different companies from around the world, the search engine is used for finding information on the Internet.
Uses of the Internet:
● Files, pictures, songs, and video can be shared by downloading (receiving) and uploading (sending).
● Send e-mail messages.
● The Internet is also used for communicating with others through social networks, online games, forums, chat, e-mails etc.
● Participate in discussion groups, such as mailing lists and newsgroups.
● Surfing the web.
● To make life more convenient internet also provides thousands of services. For example, many financial Companies offer online banking that enables a user to manipulate and view their account online.
Key takeaway
The internet is also considered a Superhighway for transmitting information.
It is the largest network in the world that connects hundreds of thousands of individual networks all over the world. The Internet moves your ideas and information from one place to another place.
It is an interconnected computer network system that spans the globe. It makes use of the TCP/IP protocol, which is widely used on the internet. A unique IP address is assigned to every machine on the Internet. An IP Address (for example, 110.22.33.114) is a series of integers that identify the location of a computer.
A DNS (Domain Name Server) computer is used to give an IP Address a name so that a user can find a computer by name.
ARPANET was expanded to connect the Department of Defense with US colleges conducting defense-related research. It included most of the country's major universities. When University College London (UK) and Royal Radar Network (Norway) joined to the ARPANET and formed a network of networks, the concept of networking received a boost.
Stanford University's Vinton Cerf, Yogen Dalal, and Carl Sunshine invented the name "internet" to characterize this network of networks. They also collaborated on protocols to make information sharing via the Internet easier. The Transmission Control Protocol (TCP) is still the networking's backbone.
In the 1960s, the Internet was created as a means for government researchers to communicate information. In the 1960s, computers were enormous and stationary, and in order to access information stored on them, one had to either travel to the computer's location or have magnetic computer tapes transported through the mail system.
The escalation of the Cold War was another factor in the development of the Internet. The launch of the Sputnik satellite by the Soviet Union prompted the United States Defense Department to examine how information may be distributed even after a nuclear attack. This eventually led to the creation of the ARPANET (Advanced Research Projects Agency Network), which eventually evolved into the Internet we know today.
ARPANET was a huge success, but it was only open to a few academic and research institutions with Defense Department contracts. As a result, new networks were formed to facilitate information sharing.
The Internet celebrates its formal birthday on January 1, 1983. Prior to this, there was no standard means for computer networks to communicate with one another. Transfer Control Protocol/Internetwork Protocol (TCP/IP) was created as a new communication protocol.
This allowed various types of computers on various networks to "speak" to one another. On January 1, 1983, ARPANET and the Defense Data Network switched to the TCP/IP standard, resulting in the birth of the Internet. A universal language could now connect all networks.
Key takeaway
In the 1960s, the Internet was created as a means for government researchers to communicate information.
In the 1960s, computers were enormous and stationary, and in order to access information stored on them, one had to either travel to the computer's location or have magnetic computer tapes transported through the mail system.
Simple Mail Transfer Protocol (SMTP)
E-mail system is implemented with the help of Message Transfer Agents (MTA). There are normally two MTAs in each mailing system. One for sending e-mails and another for receiving e-mails. The formal protocol that defines the MTA client and server in the internet is called Simple Mail Transfer Protocol (SMTP).
Fig shows the range of SMTP protocol.
By referring the above diagram, we can say that SMTP is used two times. That is between the sender and sender’s mail server and between the sender’s mail server and receiver’s mail server. Another protocol is used between the receiver’s mail server and receiver.
SMTP simply defines how commands and responses must be sent back and forth.
SMTP is a simple ASCII protocol
It establishes a TCP connection between a sender and port number 25 of the receiver. No checksums are generally required because TCP provides a reliable byte stream. After exchanging all the e-mail, the connection is released.
Commands and Responses
SMTP uses commands and responses to transfer messages between an MTA client and MTA server.
Each command or reply is terminated by a two-character (carriage return and line feed) end-of-line token.
Fig 3: Commands and Responses
Commands
Client sends commands to the server. SMTP defines 14 commands. Out of that first 5 commands are mandatory; every implementation must support these commands.
The next three commands are often used and are highly recommended. Last six commands are hardly used.
Following table shows FTP commands.
Table:
Keyword | Description |
HELO | Used by the client to identify itself. The argument is domain name of the client host. The format is: HELO: mail.viit.ac.in |
MAIL FROM | Used by the client to identify the sender of the message. The argument is email address of the sender. The format is MAIL FROM: amol.dhumane@gmail.com |
RCPT TO | Used by the client to identify the intended recipient of the message. The argument is the email address of the recipient. The format is: RCPT TO: ashwini.dhumane@yahoo.co.in |
DATA | This command is used to send the actual message. The lines following DATA command are treated as mail message. The format is: DATA There is an important meeting on this Sunday. So please be present for it. Regards; Nitin Sakhare |
QUIT | It terminates the message. The format is: QUIT |
RSET | It aborts the current email transaction. The stored information of the sender and receiver is deleted after executing the command. The connection gets reset. The format is: RSET |
VRFY | This command is used to verify the address of the recipient. In this sender asks the receiver to confirm that a name identifies a valid recipient. Its format is: VRFY: sai@puneatoz.net |
NOOP | By using this command, the client checks the status of the recipient. It requires an answer from recipient. Its format is: NOOP |
TURN | It reverses the role of sender and receiver. |
EXPN | It asks the receiving host to expand the mailing list. |
HELP | It sends system specific documentation. The format is: HELP: mail
|
SEND FROM | This command specifies that the mail is to be delivered to the terminal of the recipient, and not the mailbox. If the recipient is not logged in, the mail is bounced back. The argument is the address of the sender. The format is: SEND FROM: amol.dhumane@gmail.com |
SMOL FROM | This command specifies to send the mail to the terminal if possible, otherwise to the mailbox. |
SMAL FROM
FROM | It sends mail to the terminal and mail box. |
SMTP Working
SMTP works in the following three stages:
a) Connection Establishment
b) Message Transfer
c) Connection Termination
These are explained below:
Connection Establishment
Once the TCP connection is made on port no. 25, SMTP server starts the connection phase. This phase involves following three steps which are explained in the Fig.
The server tells the client that it is ready to receive mail by using the code 220. If the server is not ready, it sends code 421 which tells that service is not available.
Fig 4: Connection Establishment
Once the server becomes ready to receive the mails, client sends HELO message to identify itself using the domain name address. This is important step which informs the server of the domain name of the client. Remember that during TCP connection establishment, the sender and receiver know each other through their IP addresses.
Server responds with code 250 which tells that the request command is completed. Message Transfer Once the connection has been established, SMTP server sends messages to SMTP receiver.
The messages are transferred in three stages
- A MAIL command identifies the message originator.
- RCPT command identifies the receiver of the message.
- DATA command transfers the message text.
Connection Closing
After the message is transferred successfully, the client terminates the connection. The connection is terminated in two steps The client sends the quit command.
The server responds with code 221 or some other appropriate code. After the connection termination phase, the TCP connection must be closed.
MIME Short for Multipurpose Internet Mail Extensions, a specification for formatting non-ASCII messages so that they can be sent over the Internet.
Many e-mail clients now support MIME, which enables them to send and receive graphics, audio, and video files via the Internet mail system. In addition, MIME supports messages in character sets other than ASCII.
There are many predefined MIME types, such as GIF graphics files and PostScript files. It is also possible to define your own MIME types.
In addition to e-mail applications, Web browsers also support various MIME types. This enables the browser to display or output files that are not in HTML format.
POP
Post Office Protocol, version 3 (POP3) is simple and feature-limited. The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
If the user wants to download e-mails from the mailbox on the mail server, mail access begins with the client. On TCP port 110, the client opens a connection to the server. In order to reach the mailbox, it then sends the user name and password. The user will then, one by one, list and retrieve the mail messages.
There are two modes for POP3: the delete mode and the hold mode. In the delete mode, after each retrieval, the mail is removed from the mailbox. In keep mode, after retrieval, the mail stays in the mailbox. When the user is operating on their permanent device, the delete mode is usually used and after reading or replying, the received mail can be saved and sorted. Normally, the keep mode is used when the user accesses her mail away from her main computer (e.g., a laptop). For later retrieval and organisation, the mail is read but kept in the system.
In some aspects, POP3 is deficient. It does not allow the user to arrange his mail on the server; it is impossible for the user to have multiple folders on the server. (The user will build directories on their own computer, of course.)
Fig 5: Command and response of POP3
Advantages of POP3
- As they are already saved on our PC, it provides easy and simple access to the emails.
- The size of the email that we receive or send has no limit.
- When all emails are saved on the local computer, it takes less server storage space.
- The maximum size of a mailbox is available, but the size of the hard disc is limited.
- It is a straightforward protocol, so it is one of the most common protocols used today.
- Configuring and using it is simple.
Disadvantages of POP3
- By default, if the emails are downloaded from the server, all the emails are deleted from the server. Mails will also not be accessed from other computers unless they are programmed to leave a mail copy on the server.
- It can be tough to move the mail folder from the local computer to another machine.
- As all of the attachments are placed on your local computer, if the virus scanner does not scan them, there is a high chance of a virus attack. Virus attacks can destroy your machine.
- There could also be corruption in the email folder that is downloaded from the mail server.
- Mails are saved on a local server, so the email folder can be accessed by someone who is sitting on your machine.
Key takeaway:
● Post Office Protocol, version 3 is simple and feature-limited.
● The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
● In order to reach the mailbox, it then sends the user name and password.
IMAP
Internet Message Access Protocol (IMAP) is an acronym for Internet Message Access Protocol. It's an application layer protocol that allows you to receive emails from a mail server. POP3 is one of the most widely used protocols for retrieving emails.
The client/server model is also used. On the one hand, we have an IMAP client, which is a computer programme. On the other hand, we have an IMAP server, which is likewise a computer-based operation. The two computers are linked through a network.
Because the IMAP protocol is based on the TCP/IP transport layer, it makes use of the protocol's dependability implicitly. The IMAP server listens to port 143 by default whenever a TCP connection is established between the IMAP client and the IMAP server, although this port number can be altered.
IMAP is configured to use two ports by default:
● Port 143: It is a non-encrypted IMAP port.
● Port 993: This port is used when IMAP client wants to connect through IMAP securely.
IMAP History and Standards
IMAP version 2 was the first version of IMAP to be formally documented as an internet standard in RFC 1064, which was published in July 1988. It was modified in August 1990, with the same version, in RFC 1176. As a result, they created IMAP3, a new version 3 document. In February 1991, the RFC 1203 was published. However, because IMAP3 was never embraced by the market, users continued to use IMAP2. IMAPbis, a protocol extension, was later built to add support for Multipurpose Internet Mail Extensions (MIME) to IMAP. Because of MIME's utility, this was a significant advance.
IMAPbis was never published as an RFC, despite this. This could be due to issues with the IMAP3 protocol. IMAP version 4, or IMAP4, was released in two RFCs in December 1994: RFC 1730, which described the basic protocol, and RFC 1731, which described the authentication mechanism for IMAP 4. IMAP 4 is the most recent and extensively used version of IMAP. It is still being developed, and the most recent version is known as IMAP4rev1 and is defined in RFC 2060. RFC 3501 is the most recent revision.
IMAP Features
IMAP was created for a specific purpose: to give users more flexibility in how they access their inbox. It can function in any of the three modes: online, offline, or disconnected. The offline and disconnected modes are of particular importance to most protocol users.
An IMAP protocol has the following characteristics:
● Access and retrieve mail from a distant server: The user can access and retrieve mail from a remote server while keeping the messages there.
● Set message flags: The user can keep track of which messages he has already viewed by setting message flags.
● Manage multiple mailboxes: The user has the ability to manage several mailboxes and transfer messages between them. For those working on numerous projects, the user can categorise them into various categories.
● Determine information prior to downloading: Before downloading the mail from the mail server, it decides whether to retrieve or not.
● Downloads a portion of a message: It allows you to download a component of a message, such as a single body part from the mime-multi part. This is useful when a message's short-text element contains huge multimedia files.
● Search: Users can conduct a search for the contents of emails.
● Check email-header: Examine the email header: Before downloading, users can check the email header.
Advantages
The following are some of the benefits of IMAP:
● It enables us to compose email messages from any location and on as many different devices as we like.
● Only when we click on a message can it be downloaded. As a result, we don't have to wait for the server to download all of our new messages before we can view them.
● With IMAP, attachments are not immediately downloaded. As a result, you can check your messages much faster and have more control over which attachments are accessed.
● IMAP, like the Post Office Protocol, can be utilised offline (POP).
● It allows you to delete messages, search for keywords in the body of emails, create and manage multiple mailboxes or folders, and display the headers of emails for quick visual searches.
Key takeaway
Post Office Protocol, version 3 (POP3) is simple and feature-limited. The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
Internet Message Access Protocol (IMAP) is an acronym for Internet Message Access Protocol. It's an application layer protocol that allows you to receive emails from a mail server.
Web browsers are programmes that are installed on your computer. A web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla Firefox, is required to access the Internet.
Currently, you must navigate through our website tutorialspoint.com using any type of Web browser. Web browsing or web surfing is the process of navigating through pages of information on the Internet.
There are four major web browsers: Internet Explorer, Firefox, Netscape, and Safari, but there are several others. Complete Browser Statistics may be of interest to you. Now we'll take a closer look at these browsers.
We should aim to make a site compatible with as many browsers as feasible when developing it. Especially sites should be adaptable to main browsers like Explorer, Firefox, Chrome, Netscape, Opera, and Safari.
Internet Explorer
Microsoft's Internet Explorer (IE) is a software product. This is the most widely used web browser on the planet. This was debuted in 1995 in conjunction with the release of Windows 95, and it surpassed Netscape in popularity in 1998.
Internet Explorer (also known as IE or MSIE) is a free web browser that allows users to view web pages on the internet. It can also be used to access online banking, internet marketing, listen to and watch streaming videos, and many other things. Microsoft first released it in 1995. It was created in response to Netscape Navigator, the first geographical browser.
For many years, from 1999 to 2012, Microsoft Internet Explorer was the most used web browser, surpassing Netscape Navigator. Network file sharing, multiple internet connections, active Scripting, and security settings are all included.
Google Chrome
Google created this web browser, and the beta version was published on September 2, 2008 for Microsoft Windows. Chrome is now one of the most popular web browsers, with a global market share of more than 50%.
Google Chrome is the most popular open-source internet browser for accessing information on the World Wide Web. It was released on December 11, 2008, by Google for Windows, Linux, Mac OS X, Android, and iOS users. It provides Web security through a sandboxing-based technique. It also adheres to web standards such as HTML5 and CSS (cascading style sheet).
Google Chrome was the first online browser to integrate the search box and address bar, a feature that was quickly replicated by other competitors. Google launched the Chrome Web Store in 2010, allowing users to purchase and install Web-based applications.
Mozilla Firefox
Mozilla has created a new browser called Firefox. It was first introduced in 2004 and has since evolved to become the Internet's second most used browser.
Mozilla Firefox is an open-source web browser that allows users to access information on the Internet. Firefox, the popular Web browser, has a simpler user interface and better download speeds than Internet Explorer. To translate web pages, it employs the Gecko layout engine, which follows current and predicted web standards.
Firefox was popular as a replacement for Internet Explorer 6.0 because it protected users from spyware and harmful websites. After Google Chrome, Apple Safari, and UC Browser, it was the fourth most popular web browser in 2017.
Safari
Safari is an Apple Inc. Web browser that comes standard with Mac OS X. It was originally made available to the public as a public beta in January 2003. Safari offers excellent compatibility for modern technologies like as XHTML and CSS2.
Safari is a web browser for the iPhone, iPad, and iPod Touch, as well as the Macintosh and Windows operating systems. Apple, Inc. Released it on June 30, 2003. It is the primary browser for Apple's operating systems, such as OS X for MacBook and Mac computers and iOS for iPad and iPhone smartphones and tablets. After Microsoft Internet Explorer, Mozilla Firefox, and Google Chrome, it is the fourth most used browser. It makes use of the WebKit engine, which handles font rendering, graphics display, page layout, and JavaScript execution.
Opera
Opera is a full-featured browser that is smaller and faster than most other browsers. With a keyboard interface, numerous windows, zoom functions, and more, it's quick and easy to use. There are Java and non-Java versions available. Ideal for novices to the Internet, schoolchildren, the handicapped, and as a CD-Rom and kiosk front-end.
Konqueror
Konqueror is an HTML 4.01 compliant web browser that also supports Java applets, JavaScript, CSS 1, CSS 2.1, and Netscape plugins. This programme functions as a file manager and offers basic file management on local UNIX filesystems, ranging from simple cut/copy/paste operations to advanced remote and local network file browsing.
Lynx
Lynx is a full-featured Web browser for Unix, VMS, and other platforms with cursor-addressable character-cell terminals or emulators.
Key takeaway
Web browsers are programmes that are installed on your computer. A web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla Firefox, is required to access the Internet.
What is E-mail?
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments. Generally, it is information that is stored on a computer sent through a network to a specified individual or group of individuals.
Email messages are conveyed through email servers; it uses multiple protocols within the TCP/IP suite. For example, SMTP is a protocol, stands for simple mail transfer protocol and used to send messages whereas other protocols IMAP or POP are used to retrieve messages from a mail server. If you want to login to your mail account, you just need to enter a valid email address, password, and the mail servers used to send and receive messages.
Although most of the webmail servers automatically configure your mail account, therefore, you only required to enter your email address and password. However, you may need to manually configure each account if you use an email client like Microsoft Outlook or Apple Mail. In addition, to enter the email address and password, you may also need to enter incoming and outgoing mail servers and the correct port numbers for each one.
Email messages include three components, which are as follows:
● Message envelope: It depicts the email's electronic format.
● Message header: It contains email subject line and sender/recipient information.
● Message body: It comprises images, text, and other file attachments.
The email was developed to support rich text with custom formatting, and the original email standard is only capable of supporting plain text messages. In modern times, email supports HTML (Hypertext markup language), which makes it capable of emails to support the same formatting as websites. The email that supports HTML can contain links, images, CSS layouts, and also can send files or "email attachments" along with messages. Most of the mail servers enable users to send several attachments with each message. The attachments were typically limited to one megabyte in the early days of email. Still, nowadays, many mail servers are able to support email attachments of 20 megabytes or more in size.
In 1971, as a test e-mail message, Ray Tomlinson sent the first e-mail to himself. This email was contained the text "something like QWERTYUIOP." However, the e-mail message was still transmitted through ARPANET, despite sending the e-mail to himself. Most of the electronic mail was being sent as compared to postal mail till 1996.
Differences between email and webmail
The term email is commonly used to describe both browser-based electronic mail and non-browser-based electronic mail today. The AOL and Gmail are browser-based electronic mails, whereas Outlook for Office 365 is non-browser-based electronic mail. However, to define email, a difference was earlier made as a non-browser program that needed a dedicated client and email server. The non-browser emails offered some advantages, which are enhanced security, integration with corporate software platforms, and lack of advertisements.
Uses of email
Email can be used in different ways: it can be used to communicate either within an organization or personally, including between two people or a large group of people. Most people get benefit from communicating by email with colleagues or friends or individuals or small groups. It allows you to communicate with others around the world and send and receive images, documents, links, and other attachments. Additionally, it offers benefit users to communicate with the flexibility on their own schedule.
There is another benefit of using email; if you use it to communicate between two people or small groups that will beneficial to remind participants of approaching due dates and time-sensitive activities and send professional follow-up emails after appointments. Users can also use the email to quickly remind all upcoming events or inform the group of a time change. Furthermore, it can be used by companies or organizations to convey information to large numbers of employees or customers. Mainly, email is used for newsletters, where mailing list subscribers are sent email marketing campaigns directly and promoted content from a company.
Email can also be used to move a latent sale into a completed purchase or turn leads into paying customers. For example, a company may create an email that is used to send emails automatically to online customers who contain products in their shopping cart. This email can help to remind consumers that they have items in their cart and stimulate them to purchase those items before the items run out of stock. Also, emails are used to get reviews by customers after making a purchase. They can survey by including a question to review the quality of service.
History of E-mail
As compared to ARPANet or the Internet, email is much older. The early email was just a small advance, which is known as a file directory in nowadays. It was used to just put a message in other user's directory in the place where they were able to see the message by logging in. For example, the same as leaving a note on someone's desk. Possibly MAILBOX was used at Massachusetts Institute of Technology, which was the first email system of this type from 1965. For sending messages on the same computer, another early program was SNDMSG.
Users were only able to send messages to several users of the same computer through email when the internetworking was not beginning. And, the problem became a little more complex when computers began to talk to each other over networks, we required to put a message in an envelope and address it for the destination.
Later in 1972, Ray Tomlinson invented email to remove some difficulties. Tomlinson worked (Like many of the Internet inventors) for Newman and Bolt Beranek as an ARPANET contractor. To denote sending messages from one computer to another, he picked up the @ symbol from the keyboard. Then, it became easy to send a message to another with the help of Internet standards; they were only required to propose name-of-the-user@name-of-the-computer. One of the first users of the new system was Internet pioneer Jon Postel. Also, describing as a "nice hack," credited goes to Jon Postel.
Although the World Wide Web offers many services, email is the most widely used facility and remains the most important application of the Internet. On the international level, over 600 million people use email. There were hundreds of email users by 1974, as ARPANET ultimately encouraged it. Furthermore, email caused a radical shift in Arpa's purpose, as it became the savior of Arpanet.
From there were rapid developments in the field of the email system. A big enhancement was to sort emails; some email folders for his boss were invented by Larry Roberts. To organize an email, John Vittal developed some software in 1976. By 1976 commercial packages began to appear, and email had really taken off. The email had changed people and took them from Arpanet to the Internet. Here was appeared some interesting features that ordinary people all over the world wanted to use.
Some years later, Ray Tomlinson observed about email. As compared to the previous one, any single development is stepping rapidly and nearly followed by the next. I think that all the developments would take a big revolution.
When personal computers came on the scene, the offline reader was one of the first new developments. Then, email users became able to store their email on their own personal computers with the help of offline reader and read it. Also, without actually being connected to the network, they were able to prepare replies like Microsoft Outlook can do today. In parts of the world, this was specifically useful for people where the telephone was expensive as compared to the email system.
Without being connected to a telephone, it was able to prepare a reply with connection charges of many dollars a minute and then get on the network to send it. Also, it was useful as the offline mode allowed for more simple user interfaces. In this modern time of very few standards being connected directly to the host email system often resulted in no capacity for text to wrap around on the screen of the user's computer, and backspace keys and delete keys may not work and other such annoyances. Offline readers helped out more to overcome these kinds of difficulties.
The SMTP (simple mail transfer protocol) was the first important email standard. It was a fairly naïve protocol that is still in use. And, it was made in terms of no attempt to find the person who sent a message that was the right or not what they claimed to be. In the email addresses, fraudulent was very easy and is still available. Later, these basic flaws were used in the protocol by security frauds, worms and viruses, and spammers forging identities. From 2004, some of these problems are still being processed for a solution.
But as developed email system offered some important features that helped out people to understand easily about email. In 1988, Steve Dorner developed Eudora that was one of the first good commercial systems. But it did not appear for a long time after Pegasus mail come. Servers began to appear as a standard when Internet standards POP (Post office protocol) for email began to mature. Each server was a little different before standard post office protocol (POP). POP was an important standard that allowed users to work together.
Individual dialup users were required to charges for an email per-minute in those days. Also, on the Internet, email and email discussion groups were the main uses for most people. There were several issues on a wide variety of subjects; they became USENET as a body of newsgroups.
With the World Wide Web (WWW), email became available with a simple user interface that was offered by providers like Hotmail and Yahoo. And, users did not require to pay any charges on these platforms. Now everyone wanted at least one email address as it is much simple and affordable, and the medium was adopted by millions of people.
Internet Service Providers (ISPs) started to connect people with each other all over the world by the 1980s. Also, by 1993 the use of the Internet was becoming widespread, and the word electronic mail was replaced by email.
Today, email has become a primary platform to communicate with people all over the world. There are continuing updates to the system with so many people using email for communication. Although email has some security issues, there have been laws passed to prevent the spread of junk email over the years.
Advantages of Email
There are many advantages of email, which are as follows:
● Cost-effective: Email is a very cost-effective service to communicate with others as there are several email services available to individuals and organizations for free of cost. Once a user is online, it does not include any additional charge for the services.
● Email offers users the benefit of accessing email from anywhere at any time if they have an Internet connection.
● Email offers you an incurable communication process, which enables you to send a response at a convenient time. Also, it offers users a better option to communicate easily regardless of different schedules users.
● Speed and simplicity: Email can be composed very easily with the correct information and contacts. Also, minimum lag time, it can be exchanged quickly.
● Mass sending: You can send a message easily to large numbers of people through email.
● Email exchanges can be saved for future retrieval, which allows users to keep important conversations or confirmations in their records and can be searched and retrieved when they needed quickly.
● Email provides a simple user interface and enables users to categorize and filter their messages. This can help you recognize unwanted emails like junk and spam mail. Also, users can find specific messages easily when they are needed.
● As compared to traditional posts, emails are delivered extremely fast.
● Email is beneficial for the planet, as it is paperless. It reduces the cost of paper and helps to save the environment by reducing paper usage.
● It also offers a benefit to attaching the original message at the time you reply to an email. This is beneficial when you get hundreds of emails a day, and the recipient knows what you are talking about.
● Furthermore, emails are beneficial for advertising products. As email is a form of communication, organizations or companies can interact with a lot of people and inform them in a short time.
Disadvantages of Email
● Impersonal: As compared to other forms of communication, emails are less personal. For example, when you talk to anyone over the phone or meeting face to face is more appropriate for communicating than email.
● Misunderstandings: As email includes only text, and there is no tone of voice or body language to provide context. Therefore, misunderstandings can occur easily with email. If someone sends a joke on email, it can be taken seriously. Also, well-meaning information can be quickly typed as rude or aggressive that can impact wrong. Additionally, if someone types with short abbreviations and descriptions to send content on the email, it can easily be misinterpreted.
● Malicious Use: As email can be sent by anyone if they have an only email address. Sometimes, an unauthorized person can send you mail, which can be harmful in terms of stealing your personal information. Thus, they can also use email to spread gossip or false information.
● Accidents Will Happen: With email, you can make fatal mistakes by clicking the wrong button in a hurry. For instance, instead of sending it to a single person, you can accidentally send sensitive information to a large group of people. Thus, the information can be disclosed, when you have clicked the wrong name in an address list. Therefore, it can be harmful and generate big trouble in the workplace.
● Spam: Although in recent days, the features of email have been improved, there are still big issues with unsolicited advertising arriving and spam through email. It can easily become overwhelming and takes time and energy to control.
● Information Overload: As it is very easy to send email to many people at a time, which can create information overload. In many modern workplaces, it is a major problem where it is required to move a lot of information and impossible to tell if an email is important. And, email needs organization and upkeep. The bad feeling is one of the other problems with email when you returned from vacation and found hundreds of unopened emails in your inbox.
● Viruses: Although there are many ways to travel viruses in the devices, email is one of the common ways to enter viruses and infect devices. Sometimes when you get a mail, it might be the virus come with an attached document. And, the virus can infect the system when you click on the email and open the attached link. Furthermore, an anonymous person or a trusted friend or contact can send infected emails.
● Pressure to Respond: If you get emails and you do not answer them, the sender can get annoyed and think you are ignoring them. Thus, this can be a reason to make pressure on your put to keep opening emails and then respond in some way.
● Time Consuming: When you get an email and read, write, and respond to emails that can take up vast amounts of time and energy. Many modern workers spend their most time with emails, which may be caused to take more time to complete work.
● Overlong Messages: Generally, email is a source of communication with the intention of brief messages. There are some people who write overlong messages that can take much time than required.
● Insecure: There are many hackers available that want to gain your important information, so email is a common source to seek sensitive data, such as political, financial, documents, or personal messages. In recent times, there have various high-profile cases occurred that shown how email is insecure about information theft.
Different types of Email
There are many types of email; such are as follows:
● Newsletters: It is studying by Clutch, the newsletter is the most common type of email that are routinely sent to all mailing list subscribers, either daily, weekly, or monthly. These emails often contain from the blog or website, links curated from other sources, and selected content that the company has recently published. Typically, Newsletter emails are sent on a consistent schedule, and they offer businesses the option to convey important information to their client through a single source. Newsletters might also incorporate upcoming events or new, webinars from the company, or other updates.
● Lead Nurturing: Lead-nurturing emails are a series of related emails that marketers use to take users on a journey that may impact their buying behavior. These emails are typically sent over a period of several days or weeks. Lead-nurturing emails are also known as trigger campaigns, which are used for solutions in an attempt to move any prospective sale into a completed purchase and educate potential buyers on the services. These emails are not only helpful for converting emails but also drive engagement. Furthermore, lead-nurturing emails are initiated by a potential buyer taking initial action, such as clicking links on a promotional email or downloading a free sample.
● Promotional emails: It is the most common type of B2B (Business to Business) email, which is used to inform the email list of your new or existing products or services. These types of emails contain creating new or repeat customers, speeding up the buying process, or encouraging contacts to take some type of action. It provides some critical benefits to buyers, such as a free month of service, reduced or omitted fees for managed services, or percentage off the purchase price.
● Standalone Emails: These emails are popular like newsletters emails, but they contain a limitation. If you want to send an email with multiple links or blurbs, your main call-to-action can weaken. Your subscriber may skip your email and move on, as they may click on the first link or two in your email but may not come back to the others.
● Onboarding emails: An onboarding email is a message that is used to strengthen customer loyalty, also known as post-sale emails. These emails receive users right after subscription. The onboarding emails are sent to buyers to familiarize and educate them about how to use a product effectively. Additionally, when clients faced with large-scale service deployments, these emails help them facilitate user adoption.
● Transactional: These emails are related to account activity or a commercial transaction and sent from one sender to one recipient. Some examples of transactional email are purchase confirmations, password reminder emails, and personalized product notifications. These emails are used when you have any kind of e-commerce component to your business. As compared to any other type of email, the transactional email messages have 8x the opens and clicks.
● Plain-Text Emails: It is a simple email that does not include images or graphics and no formatting; it only contains the text. These types of emails may worth it if you try to only ever send fancy formatted emails, text-only messages. According to HubSpot, although people prefer fully designed emails with various images, plain text emails with less HTML won out in every A/B test. In fact, HTML emails contain lower open and click-through rates, and plain text emails can be great for blog content, event invitations, and survey or feedback requests. Even if you do not send plainer emails, but you can boost your open and click through rates by simplifying your emails and including fewer images.
● Welcome emails: It is a type of B2B email and common parts of onboarding emails that help users get acquainted with the brand. These emails can improve subscriber constancy as they include additional information, which helps to the new subscriber in terms of a business objective. Generally, welcome emails are sent to buyers who got a subscription to a business's opt-in activities, such as a blog, mailing list, or webinar. Also, these emails can help businesses to build a better relationship between customers.
What can be sent in an e-mail?
An email is a platform that enables users to communicate with each other. It allows users to send text messages, including a file or other data on the e-mail all over the world. It is also possible to attach a picture, word processor document, PDF, program, movie, or any file stored on your computer in an e-mail. However, due to some security issues, it may not be possible to send certain types of files on the email; they need some additional steps. For example, the .exe file can be blocked by many companies from being sent over the email, and you will need to compress the file into a .zip file format. Additionally, you may be unable to send any large files or programs from being sent over e-mail as most e-mail providers have file size restrictions.
What should be write e-mail?
You can use any word email or e-mail according to the style guide you are following as both are valid and have the same meaning. However, the e-mail word has a hyphen and is a compound noun that describes "electronic" and "mail."
What makes a valid e-mail address?
Users need to follow the various rule that is given below to make valid email address:
● A username followed by @ (the at sign) is most important for an email address, which is followed by the domain name with a domain suffix. Hence, an e-mail must have a username.
● The domain name cannot be longer than 254 characters, and the username cannot be longer than 64 characters long.
● An email must have only one @ sign.
● An email should not have space and special characters like \ [ ] ( ) , : ; < >. Sometimes, few symbols such as backslash, space, and quotation mark work must be preceded with a forward slash. But these characters are not allowed by some email providers.
● In the email, the email address and username cannot start or end with a period.
● The two or more successive periods are not allowed in the email.
E-mail Message Components
E-mail message comprises of different components: E-mail Header, Greeting, Text, and Signature. These components are described in the following diagram:
E-mail Header
The first five lines of an E-mail message is called E-mail header. The header part comprises of following fields:
a) From
b) Date
c) To
d) Subject
e) CC
f) BCC
From
The From field indicates the sender’s address i.e. who sent the e-mail.
Date
The Date field indicates the date when the e-mail was sent.
To
The To field indicates the recipient’s address i.e. to whom the e-mail is sent.
Subject
The Subject field indicates the purpose of e-mail. It should be precise and to the point.
CC
CC stands for Carbon copy. It includes those recipient addresses whom we want to keep informed but not exactly the intended recipient.
BCC
BCC stands for Black Carbon Copy. It is used when we do not want one or more of the recipients to know that someone else was copied on the message.
Greeting
Greeting is the opening of the actual message. Eg. Hi Sir or Hi Guys etc.
Text
It represents the actual content of the message.
Signature
This is the final part of an e-mail message. It includes Name of Sender, Address, and Contact Number.
Key takeaway
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments.
Compose e-mail, Send e-mail
To write and send e-mail with data and messages, do the following:
Step 1: In order to create a new e-mail and send data through it a user has to click on “Compose” option available at the top of inbox option as shown in the picture below.
Step 2: A “New Message” box will appear as you can see in the below picture asking you to enter details in order to create a new e-mail message.
Note: New messages in an e-mail are stored in Inbox folder of the e-mail and all saved messages appears in draft folder of your e-mail.
Here, In the New Message box, you will see the following things:
● To: Mail ID of the recipient
● Cc: To send a Carbon copy i.e., send this mail to several people at the same time and also show everyone the email id’s of all the other people who have received it.
● Bcc: To send a Blind Carbon copy i.e., send this mail to several people at the same time but without showing the person in Bcc list about who else has received this mail.
● Subject: Is the main part which will be shown first to the person receiving the mail. It should be short and relevant to your mail and must tell the reason for your e-mail.
● Body: The body of the e-mail is the blank white part where the user can type his message and can even customise it. In above picture we have written “Hello” to show the body of this e-mail.
● Insert Bar: This bar is available at the bottom of the e-mail compose window. It includes various options to insert document, links, emoji’s, Google drive files, images, signature, delete the email etc.
User simply has to click on one of these options to insert an object and a new window will appear that will ask you about the file location which you want to insert into this mail. After locating the file just click on insert and the file will start uploading to this e-mail, once it is done it can be seen in the e-mail window. You can also open or remove the file from the e-mail using the options available alongside your uploaded file.
Delete button: There is a dustbin icon at the end of this email which lets a user to delete or discard there typed mail. Once discarded the mail cannot be retrieved.
Note: The close option is also available at the top of the window but that option will not delete the e-mail you have typed it simply closes the window and save the typed e-mail in drafts folder for future editing or usage purpose.
Step 3: The send icon is the blue one which is used to send the e-mail once it is composed. All the files inserted along with the text will be sent to the e-mail addresses once the user clicks on this button.
Note: There are various other options available under this Mail compose window such as Print, Schedule send, Minimise and Maximise the window which can be used for better e-mail experience of the user.
File attachment
An email attachment is a file that is sent together with an email from one person to another. Its objective is usually to increase the value or advantage that the email provides to the reader by including additional content that you can't express in the email body. The attachment can be in a variety of formats and sizes, with huge text files, various sorts of documents, spreadsheets, scanned files, forms, photos, and videos being the most common.
What is the best way to write an email with an attachment?
When preparing and sending an email with an attachment, keep these five procedures in mind:
1. Determine what files you wish to send
You should know exactly what file you are intending to transmit and where it is on your device's hard disc or memory drive before sending the email. Knowing what file(s) you're about to send is vital since you'll need to mention them in the email's text, and knowing where they are can help you discover and attach them quickly before sending the email.
2. Write the email's subject line
The subject line of the email is the next step. Because many potential recipients may ignore emails with attachments unless they know what they are, the subject of the email should indicate that it has one or more attachments and provide information about what they are.
3. Compose the email's body
If the attachments are the primary reason for sending an email, the body of the message can just be a brief summary of the files attached. If the attached files are only a small portion of what the email is trying to say, they should be referenced in the body, preferably with a short line that explains what they are. It's not a good idea to send an email with attachments but no text since the recipient or their email provider might think it's spam.
4. Attach the files
Attaching the relevant file or files to the email is the final step before sending it. This stage, however, can happen at any point during the writing and sending procedure. Many senders prefer to attach the files before drafting the email because it reduces the chances of forgetting to do so.
5. Review and send the email
After you've written the subject and content of the email and attached the attachments, you can proofread it before sending it to the recipient.
Attach a file
● Go to Gmail on your PC.
● Click the Compose button.
● Click Attach Attach at the bottom of the page.
● Select the files you'd like to upload.
● Click the Open button.
Remove an attachment
You can remove an attachment after it has been added. Tap Close Close to the right of the attachment name.
Send attachments with confidential mode
- Go to Gmail on your PC.
- Click the Compose button.
- Attach the file by clicking on it.
- Select the files you'd like to upload.
- Turn on confidential mode in the lower right corner of the window. Turn on the private mode.
Tip: To edit an email that has already been set to confidential mode, go to the bottom of the email and select Edit.
6. Set a passcode and an expiration date. Both the message text and any attachments are affected by these parameters.
● If "No SMS passcode" is selected, receivers who use the Gmail app will be able to open it directly. A passcode will be emailed to those who do not use Gmail.
● If you select "SMS passcode," recipients will receive a text message with a passcode. Make sure the recipient's phone number, not your own, is entered.
7. Save the file.
Uploading & downloading
Fig 6: Uploading and downloading
Uploading
If a website accepts file uploads, it will feature an upload tool to assist with the process. This method is handled differently by each site, however we'll provide some instances. The site's help sections will usually assist you through the upload process.
Many websites feature a button that opens a dialogue box when you click it. Facebook, for example, includes a camera icon that starts the uploading process.
You'll be prompted to choose a file in a dialogue window. Navigate to your file's location, pick it, and then click the Open button. Following that, a progress bar will show on the page, tracking the upload process.
A drag-and-drop interface is available on some websites. When logged in to Dropbox, for example, you can drag and drop files from a folder on your computer into the browser window.
Downloading
When you download a file, you usually begin the process by clicking on a link to that file.
When you click the link, your browser should prompt you to choose one of two download options.
● Open with will download the file and open it in the given programme right away.
● It will be downloaded and saved to your hard drive when you click Save File.
The download will commence in either case as you click OK. Your browser will show you how far along the download is and how much time is left.
When the download is finished, the file will either be saved to your computer or opened in the programme you chose. Check try our Finding Your Downloads lesson if you're having problems finding the file after you've downloaded it.
● When you click the link to a file, some browsers don't always start the download process. In these circumstances, right-click the link, choose Save Link As, and then choose a location to save the file.
References:
- Operating System Concepts – Silberschatz, Galvin and Gagne
- Operating System By Godbole
- Linux Bible 9th Edition by Christoper Negus ISBN :978-1-118-99987-5
- Ball, Using Linux, PHI, 1998. ISBN-10: 0789716232
Unit - 2
Shell Programming and Internet
Shell Scripting is a free and open-source programming software that runs on the Unix/Linux shell. Shell Scripting is a program that allows you to write a series of commands to be executed by the shell. It can condense long and repetitive command sequences into a single, simple script that can be saved and executed at any time, reducing programming time.
Shells such as bash and korn in Linux support programming constructs that can be stored as scripts. Many Linux commands are scripted as a result of these scripts being shell commands.
To understand how their servers and applications are started, updated, maintained, or disabled, and to understand how a user interface is designed, a system administrator should have a basic understanding of scripting.
Shells are usually interactive, which means they accept user commands as input and execute them. However, there are times when we need to run a series of commands on a regular basis, and we must type all commands into the terminal each time.
We can write these commands in a file and execute them in shell to avoid this repetitive work because shell can take commands from files as input. Shell Scripts or Shell Programs are the names given to these files. The batch file in MS-DOS is identical to shell scripts. Each shell script has a.sh file extension, such as myscript.sh.
Shell scripts use the same syntax as other programming languages. It will be very simple to get started if you have previous experience with any programming language such as Python, C/C++, or others.
The following elements make up a shell script:
● Shell Keywords – if, else, break etc.
● Shell commands – cd, ls, echo, pwd, touch etc.
● Functions
● Control flow – if..then..else, case and shell loops etc.
Key takeaway
Shell Scripting is a free and open-source programming software that runs on the Unix/Linux shell. Shell Scripting is a program that allows you to write a series of commands to be executed by the shell.
Normally, the shell runs the commands in a script in the order they are written in the text, one after the other.
Frequently, though, you will want to alter the way commands are executed.
Depending on the circumstances, you may want to run one command over and over, or you may want to run a command several times.
The shell provides a number of control mechanisms that can be used to change the order in which commands are executed.
There are two different types of selection mechanisms that allow you to choose between different commands:
● if/then/elif/else/fi
● case
The if statement
The if statement allows you to decide whether to run a command (or a group of commands) based on a condition.
The most basic version of this structure is as follows:
If conditional expression
Then
Command(s)
Fi
When the shell comes across a structure like this, it tests to see if the conditional expression is valid first.
If this is the case, the shell executes any commands found between the then and the fi (which is just if spelled backwards).
The shell skips the commands between then and fi if the conditional expression is false.
Example:
Here's a shell script that makes use of easy if statements:
#!/bin/sh
Set ‘date‘
If test $1 = Fri
Then
Echo "Thank goodness it’s Friday!
Fi
The test commands
In this conditional expression, we used the test instruction.
The phrase is:
Test $1 = Fri
The test command tests to see if the parameter $1 contains Fri; if it does, the condition is valid, and the message is printed.
The test command may run a number of tests; see the documentation for more details.
Using elif and else
Combining the if statement with the elif (“then if”) and else statements allows one to create even more complex selection structures.
Here's an easy example.
#!/bin/sh
Set ‘date‘
If test $1 = Fri
Then
Echo "Thank goodness it’s Friday!"
Elif test $1 = Sat 11 test $1 = Sun
Then
Echo "You should not be here working."
Echo "Log off and go home."
Else
Echo "It is not yet the weekend."
Echo "Get to work!"
Fi
The case Statement
On certain UNIX systems, the shell offers another selection structure that could be faster than the if argument.
This is the case statement, which takes the following form:
Case word in
Patternl) command(s) ;;
Pattern2) command(s) ;;
...
PatternN) command(s) ;;
Esac
The case statement compares word to pattern1, and if the two are equal, the shell executes the command(s) on the first line.
Otherwise, the shell goes through the remaining patterns one by one until it finds one that fits the expression, at which point it executes the command(s) on that line.
The default value is *.
Example:
Here's an example of a basic shell script that employs case statements:
#!/bin/sh
Set ‘date‘
Case $1 in
Fri) echo "Thank goodness it’s Friday!";;
Sat | Sun) echo "You should not be here working"; echo "Log off and go home!";;
*) echo "It is not yet the weekend."; echo "Get to work!";
Esac
For Loops
We sometimes want to repeat a command (or a set of commands).
Iteration, repetition, or looping are terms used to describe this method.
The for loop is the most common shell repetition structure, and it has the following general form:
For variable in list
Do
Command(s)
Done
Example:
Here's an easy example:
#!/bin/sh
For host in $*
Do
Ping $host
Done
While Loops
The while loop is described as follows:
While condition
Do
Command(s)
Done
The commands between the do and the done are executed as long as the condition is true.
Example:
#!/bin/sh
# Print a message ten times
Count=10
While test $count -gt 0
Do
Echo $*
Count=‘expr $count - 1
Done
Until Loops
The until loop is another form of iteration structure.
It takes the following general form:
Until condition
Do
Command
Done
Unless the condition is valid, this loop continues to execute the command(s) between do and done.
Instead of using while loops, we can rewrite the previous script using an until loop:
#!/bin/sh
# Print a message ten times
Count=10
Until test $count -eq 0
Do
Echo $*
Count=‘expr $count
Done
Conditional Execution
The Exit Code of the first command is used in the following two examples to conditionally execute the second command. The logical AND operator, &&, only runs the second command if the first one was good.
$ gcc myprog.c && a.out
If the first command fails, the logical OR operator || executes the second command.
$ gcc myprog.c || echo compilation failed
Continue statement
The continue statement is identical to the break instruction, except that it only exits the current loop iteration, not the entire loop.
If an error occurs, but you still want to attempt to perform the next iteration of the loop, use this expression.
Syntax:
Continue
The continue instruction, like the break statement, can be given an integer argument to skip commands from nested loops.
Continue n
The nth enclosing loop to proceed from is defined by n.
Example:
The continue statement is used in the following loop, which returns from the continue statement and begins processing the next statement.
#!/bin/sh
NUMS="1 2 3 4 5 6 7"
For NUM in $NUMS
Do
Q=expr $NUM % 2
If [ $Q -eq 0 ]
Then
Echo "Number is an even number!!"
Continue
Fi
Echo "Found odd number"
Done
When you run it, you'll get the following result:
Found odd number
Number is an even number!!
Found odd number
Number is an even number!!
Found odd number
Number is an even number!!
Found odd number
Break statement
Since all of the lines of code up to the break statement have been executed, the break statement is used to end the loop's execution. It then descends to the code following the loop's conclusion.
Syntax:
To get out of a loop, use the break statement below.
Break
This format can also be used to exit a nested loop with the break command -
Break n
The nth enclosing loop to exit from is defined by n.
Example:
Here's a simple example that demonstrates how the loop ends when an equals 5.
#!/bin/sh
a=0
While [ $a -lt 10 ]
Do
Echo $a
If [ $a -eq 5 ]
Then
Break
Fi
a=expr $a + 1
Done
When you run it, you'll get the following result:
0
1
2
3
4
5
Here's a simple nested for loop illustration. If var1 equals 2 and var2 equals 0, this script exits all loops.
#!/bin/sh
For var1 in 1 2 3
Do
For var2 in 0 5
Do
If [ $var1 -eq 2 -a $var2 -eq 0 ]
Then
Break 2
Else
Echo "$var1 $var2"
Fi
Done
Done
When you run it, you'll get the following result. You have a break command with the argument 2 in the inner loop. This means that if a condition is met, you can exit the outer loop and eventually the inner loop as well.
1 0
1 5
The read command in Linux is used to read a line's contents into a variable. For Linux systems, this is a built-in command. As a result, we won't need to install any more software. When writing a bash script, it's a simple tool to utilise to get user input. It's a useful tool, just like the echo command and the positional parameter. It's used to separate the words associated with the shell variable. It is mostly used to receive user input, but it can also be used to implement functions while receiving input.
Syntax:
The read command has the following basic syntax:
Read [options] [name...]
How to use the read command?
With and without arguments, the read command can be used. Let's have a look at how the read command might be used in different situations:
● Default Behaviour
If we run the read command without any arguments, it will accept a line as user input and save it in the 'REPLY' built-in variable. Run the command as follows:
Read
The command above will prompt the user for input. To save the user input, type it in and hit the ENTER key. Execute the command as follows to see the entered content:
Echo $REPLY
The above command will display the 'REPLY' variable's stored input.
● Specify the variables to store the values
We can define the variables that will be used to store the data. If the number of provided variables is less than the number of entered words, all leftover words will be stored in the last variable by default. Consider the command below:
Read var1 var2 var3
● read -p
For the prompt text, the '-p' option is used. It reads the data as well as some hints. This tip text guides us through the process of typing text, such as what to type. Consider the command below:
Read -p " Enter your name: "
The command above will prompt you for your name; type it in. The name will be saved in the variable 'REPLY.' Execute the following command to see the variable value:
Echo " My name is $REPLY"
● read -n
The '-n' option shortens the character length in the entered text. It will not allow you to type more than the number of characters specified. It will automatically cease reading after the maximum number of characters has been reached. Execute the following command to limit the number of characters to six:
Read -n 6 -p " Enter 6 characters only: "
We can't enter more than 6 characters with the instruction above.
● read -s
For security reasons, the '-s' option is utilised. It is used to read sensitive information. The entered text will not appear in the terminal if this option is selected. With this option, we can use additional options. In this option, the characters are read aloud. Its primary function is to read passwords from the keyboard. Consider the command below:
Read -s -p "Enter password: "
The above command will demand for a password, but the password will not be displayed on the terminal when we type it.
Echo statement
In Linux, the echo command is used to display a line of text/string that has been supplied as an argument. This is a built-in command that outputs status text to the screen or a file. It's typically used in shell scripts and batch files.
Syntax:
Echo [option] [string]
Displaying a text/string :
Syntax:
Echo [string]
Example:
Echo -e "World \bis \bBeautiful"
Output
Implementations of the echo command
SymbOS, KolibriOS, HP MPE/iX, ReactOS, Microsoft Windows, IBM OS/2, Digital Research FlexOS, Acorn Computers Panos, Microwave OS-9, Zilog Z80-RIO, MetaComCo TRIPOS, TSC FLEX, Multics, Unix-like, and Unix operating systems all provide the echo command.
Several shells, including Csh-like shells (such as zsh or Bash), Bourne-like shells, COMMAND.COM, and cmd.exe, use the echo command as a built-in command.
The command also exists inside the EFI shell.
Echo Command Options
The echo command has a number of different options. The following alternatives are listed and explained:
1. b: Use this option to remove all spaces from the text/string.
Example
Echo -e "Flowers \bare \bBeautiful"
2.\c: This option is used in conjunction with the '-e' backspace interpreter to suppress the trailing new line and continue without emitting any new lines.
Example
Echo -e "World \cis Beautiful"
3. \n: This option is used to generate a new line, which will be formed from the location where it is used.
Example:
Echo -e "World \nis \nBeautiful"
4. Echo *: This option prints every folder or file in the system. It's the same as the Linux ls command.
Example:
Echo *
5. -n: This option is used to skip echoing new lines at the end.
Example:
Echo -n "World is Beautiful"
6. Print "Hello All!" on the terminal: Use the following command to print the text "Hello All!" on the terminal:
Example:
$ echo "Hello All!"
7. Print specified file types: For example, if we want to print every '.c' file, we can use the command below:
Example:
$ echo *.txt
Text editors are used to build Shell Scripts. Open a text editor program on your Linux system, create a new file, and begin typing a shell script or shell programming. Next, grant the shell permission to execute your shell script, and save your script anywhere the shell can find it.
Let's take a look at how to make a Shell Script:
● Using a vi editor, create a file (or any other editor). .sh is the extension for a script file.
● #! /bin/sh is a good way to start the script.
● Make a program.
● Filename.sh is the name of the script file.
● Type bash filename.sh to run the script.
"#!" is a shebang operator that sends the script to the interpreter's position. The script is guided to the bourne-shell if we use "#! /bin/sh."
Let's make a quick script -
#!/bin/bash
# My first script
Echo "Hello World!"
Fig 1: Steps to create shell scripting in linux
Generating output:
The read command is used in the following script to take input from the keyboard, allocate it to the variable Individual, and finally print it on STDOUT.
#!/bin/sh
# Author: Zara Ali
# Copyright (c) Tutorialspoint.com
# Script follows here:
Echo "What is your name?"
Read PERSON
Echo "Hello, $PERSON"
Output:
Here's an example of the script in action:
$./test.sh
What is your name?
Zara Ali
Hello, Zara Ali
$
Example:
The wc command in Bash is used to count a file's total number of lines, sentences, and characters. To generate the output, this command uses the options -c, -w, and -l, as well as the argument filename. To test the next script, create a text file called fruits.txt with the following details. Text file
Fruits.txt
Mango
Orange
Banana
Grape
Guava
Apple
To count and store the total number of words in the fruits.txt file into a variable, $count words, and print the value using the echo command, run the following commands.
$ count_words=wc -w fruits.txt
$ echo "Total words in fruits.txt is $count_words"
Output:
Key takeaway
Text editors are used to build Shell Scripts. Open a text editor program on your Linux system, create a new file, and begin typing a shell script or shell programming. Next, grant the shell permission to execute your shell script, and save your script anywhere the shell can find it.
Alternative name to internet is either the net or web.
● The internet is also considered a Superhighway for transmitting information.
● It is the largest network in the world that connects hundreds of thousands of individual networks all over the world. The Internet moves your ideas and information from one place to another place.
Fig 2: Internet
How to access the Internet
● The Internet utilizes the TCP/IP protocol and is accessed using a computer modem, broadband network that is connected through an ISP (Internet Service Provider).
● An Internet Service Provider (ISP) is an organization which provides services for accessing and using the internet.
● In the case of broadband, many computers use Wi-Fi to connect to router that is connected to the ISP.
● Many of the institutes, schools and businesses have direct access to the Internet using special high-speed communication lines and equipment.
● Students and employees can access through the organization’s Local Area Networks (LAN) or through their own personal computers.
● As the Internet contains billions of web pages created by different companies from around the world, the search engine is used for finding information on the Internet.
Uses of the Internet:
● Files, pictures, songs, and video can be shared by downloading (receiving) and uploading (sending).
● Send e-mail messages.
● The Internet is also used for communicating with others through social networks, online games, forums, chat, e-mails etc.
● Participate in discussion groups, such as mailing lists and newsgroups.
● Surfing the web.
● To make life more convenient internet also provides thousands of services. For example, many financial Companies offer online banking that enables a user to manipulate and view their account online.
Key takeaway
The internet is also considered a Superhighway for transmitting information.
It is the largest network in the world that connects hundreds of thousands of individual networks all over the world. The Internet moves your ideas and information from one place to another place.
It is an interconnected computer network system that spans the globe. It makes use of the TCP/IP protocol, which is widely used on the internet. A unique IP address is assigned to every machine on the Internet. An IP Address (for example, 110.22.33.114) is a series of integers that identify the location of a computer.
A DNS (Domain Name Server) computer is used to give an IP Address a name so that a user can find a computer by name.
ARPANET was expanded to connect the Department of Defense with US colleges conducting defense-related research. It included most of the country's major universities. When University College London (UK) and Royal Radar Network (Norway) joined to the ARPANET and formed a network of networks, the concept of networking received a boost.
Stanford University's Vinton Cerf, Yogen Dalal, and Carl Sunshine invented the name "internet" to characterize this network of networks. They also collaborated on protocols to make information sharing via the Internet easier. The Transmission Control Protocol (TCP) is still the networking's backbone.
In the 1960s, the Internet was created as a means for government researchers to communicate information. In the 1960s, computers were enormous and stationary, and in order to access information stored on them, one had to either travel to the computer's location or have magnetic computer tapes transported through the mail system.
The escalation of the Cold War was another factor in the development of the Internet. The launch of the Sputnik satellite by the Soviet Union prompted the United States Defense Department to examine how information may be distributed even after a nuclear attack. This eventually led to the creation of the ARPANET (Advanced Research Projects Agency Network), which eventually evolved into the Internet we know today.
ARPANET was a huge success, but it was only open to a few academic and research institutions with Defense Department contracts. As a result, new networks were formed to facilitate information sharing.
The Internet celebrates its formal birthday on January 1, 1983. Prior to this, there was no standard means for computer networks to communicate with one another. Transfer Control Protocol/Internetwork Protocol (TCP/IP) was created as a new communication protocol.
This allowed various types of computers on various networks to "speak" to one another. On January 1, 1983, ARPANET and the Defense Data Network switched to the TCP/IP standard, resulting in the birth of the Internet. A universal language could now connect all networks.
Key takeaway
In the 1960s, the Internet was created as a means for government researchers to communicate information.
In the 1960s, computers were enormous and stationary, and in order to access information stored on them, one had to either travel to the computer's location or have magnetic computer tapes transported through the mail system.
Simple Mail Transfer Protocol (SMTP)
E-mail system is implemented with the help of Message Transfer Agents (MTA). There are normally two MTAs in each mailing system. One for sending e-mails and another for receiving e-mails. The formal protocol that defines the MTA client and server in the internet is called Simple Mail Transfer Protocol (SMTP).
Fig shows the range of SMTP protocol.
By referring the above diagram, we can say that SMTP is used two times. That is between the sender and sender’s mail server and between the sender’s mail server and receiver’s mail server. Another protocol is used between the receiver’s mail server and receiver.
SMTP simply defines how commands and responses must be sent back and forth.
SMTP is a simple ASCII protocol
It establishes a TCP connection between a sender and port number 25 of the receiver. No checksums are generally required because TCP provides a reliable byte stream. After exchanging all the e-mail, the connection is released.
Commands and Responses
SMTP uses commands and responses to transfer messages between an MTA client and MTA server.
Each command or reply is terminated by a two-character (carriage return and line feed) end-of-line token.
Fig 3: Commands and Responses
Commands
Client sends commands to the server. SMTP defines 14 commands. Out of that first 5 commands are mandatory; every implementation must support these commands.
The next three commands are often used and are highly recommended. Last six commands are hardly used.
Following table shows FTP commands.
Table:
Keyword | Description |
HELO | Used by the client to identify itself. The argument is domain name of the client host. The format is: HELO: mail.viit.ac.in |
MAIL FROM | Used by the client to identify the sender of the message. The argument is email address of the sender. The format is MAIL FROM: amol.dhumane@gmail.com |
RCPT TO | Used by the client to identify the intended recipient of the message. The argument is the email address of the recipient. The format is: RCPT TO: ashwini.dhumane@yahoo.co.in |
DATA | This command is used to send the actual message. The lines following DATA command are treated as mail message. The format is: DATA There is an important meeting on this Sunday. So please be present for it. Regards; Nitin Sakhare |
QUIT | It terminates the message. The format is: QUIT |
RSET | It aborts the current email transaction. The stored information of the sender and receiver is deleted after executing the command. The connection gets reset. The format is: RSET |
VRFY | This command is used to verify the address of the recipient. In this sender asks the receiver to confirm that a name identifies a valid recipient. Its format is: VRFY: sai@puneatoz.net |
NOOP | By using this command, the client checks the status of the recipient. It requires an answer from recipient. Its format is: NOOP |
TURN | It reverses the role of sender and receiver. |
EXPN | It asks the receiving host to expand the mailing list. |
HELP | It sends system specific documentation. The format is: HELP: mail
|
SEND FROM | This command specifies that the mail is to be delivered to the terminal of the recipient, and not the mailbox. If the recipient is not logged in, the mail is bounced back. The argument is the address of the sender. The format is: SEND FROM: amol.dhumane@gmail.com |
SMOL FROM | This command specifies to send the mail to the terminal if possible, otherwise to the mailbox. |
SMAL FROM
FROM | It sends mail to the terminal and mail box. |
SMTP Working
SMTP works in the following three stages:
a) Connection Establishment
b) Message Transfer
c) Connection Termination
These are explained below:
Connection Establishment
Once the TCP connection is made on port no. 25, SMTP server starts the connection phase. This phase involves following three steps which are explained in the Fig.
The server tells the client that it is ready to receive mail by using the code 220. If the server is not ready, it sends code 421 which tells that service is not available.
Fig 4: Connection Establishment
Once the server becomes ready to receive the mails, client sends HELO message to identify itself using the domain name address. This is important step which informs the server of the domain name of the client. Remember that during TCP connection establishment, the sender and receiver know each other through their IP addresses.
Server responds with code 250 which tells that the request command is completed. Message Transfer Once the connection has been established, SMTP server sends messages to SMTP receiver.
The messages are transferred in three stages
- A MAIL command identifies the message originator.
- RCPT command identifies the receiver of the message.
- DATA command transfers the message text.
Connection Closing
After the message is transferred successfully, the client terminates the connection. The connection is terminated in two steps The client sends the quit command.
The server responds with code 221 or some other appropriate code. After the connection termination phase, the TCP connection must be closed.
MIME Short for Multipurpose Internet Mail Extensions, a specification for formatting non-ASCII messages so that they can be sent over the Internet.
Many e-mail clients now support MIME, which enables them to send and receive graphics, audio, and video files via the Internet mail system. In addition, MIME supports messages in character sets other than ASCII.
There are many predefined MIME types, such as GIF graphics files and PostScript files. It is also possible to define your own MIME types.
In addition to e-mail applications, Web browsers also support various MIME types. This enables the browser to display or output files that are not in HTML format.
POP
Post Office Protocol, version 3 (POP3) is simple and feature-limited. The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
If the user wants to download e-mails from the mailbox on the mail server, mail access begins with the client. On TCP port 110, the client opens a connection to the server. In order to reach the mailbox, it then sends the user name and password. The user will then, one by one, list and retrieve the mail messages.
There are two modes for POP3: the delete mode and the hold mode. In the delete mode, after each retrieval, the mail is removed from the mailbox. In keep mode, after retrieval, the mail stays in the mailbox. When the user is operating on their permanent device, the delete mode is usually used and after reading or replying, the received mail can be saved and sorted. Normally, the keep mode is used when the user accesses her mail away from her main computer (e.g., a laptop). For later retrieval and organisation, the mail is read but kept in the system.
In some aspects, POP3 is deficient. It does not allow the user to arrange his mail on the server; it is impossible for the user to have multiple folders on the server. (The user will build directories on their own computer, of course.)
Fig 5: Command and response of POP3
Advantages of POP3
- As they are already saved on our PC, it provides easy and simple access to the emails.
- The size of the email that we receive or send has no limit.
- When all emails are saved on the local computer, it takes less server storage space.
- The maximum size of a mailbox is available, but the size of the hard disc is limited.
- It is a straightforward protocol, so it is one of the most common protocols used today.
- Configuring and using it is simple.
Disadvantages of POP3
- By default, if the emails are downloaded from the server, all the emails are deleted from the server. Mails will also not be accessed from other computers unless they are programmed to leave a mail copy on the server.
- It can be tough to move the mail folder from the local computer to another machine.
- As all of the attachments are placed on your local computer, if the virus scanner does not scan them, there is a high chance of a virus attack. Virus attacks can destroy your machine.
- There could also be corruption in the email folder that is downloaded from the mail server.
- Mails are saved on a local server, so the email folder can be accessed by someone who is sitting on your machine.
Key takeaway:
● Post Office Protocol, version 3 is simple and feature-limited.
● The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
● In order to reach the mailbox, it then sends the user name and password.
IMAP
Internet Message Access Protocol (IMAP) is an acronym for Internet Message Access Protocol. It's an application layer protocol that allows you to receive emails from a mail server. POP3 is one of the most widely used protocols for retrieving emails.
The client/server model is also used. On the one hand, we have an IMAP client, which is a computer programme. On the other hand, we have an IMAP server, which is likewise a computer-based operation. The two computers are linked through a network.
Because the IMAP protocol is based on the TCP/IP transport layer, it makes use of the protocol's dependability implicitly. The IMAP server listens to port 143 by default whenever a TCP connection is established between the IMAP client and the IMAP server, although this port number can be altered.
IMAP is configured to use two ports by default:
● Port 143: It is a non-encrypted IMAP port.
● Port 993: This port is used when IMAP client wants to connect through IMAP securely.
IMAP History and Standards
IMAP version 2 was the first version of IMAP to be formally documented as an internet standard in RFC 1064, which was published in July 1988. It was modified in August 1990, with the same version, in RFC 1176. As a result, they created IMAP3, a new version 3 document. In February 1991, the RFC 1203 was published. However, because IMAP3 was never embraced by the market, users continued to use IMAP2. IMAPbis, a protocol extension, was later built to add support for Multipurpose Internet Mail Extensions (MIME) to IMAP. Because of MIME's utility, this was a significant advance.
IMAPbis was never published as an RFC, despite this. This could be due to issues with the IMAP3 protocol. IMAP version 4, or IMAP4, was released in two RFCs in December 1994: RFC 1730, which described the basic protocol, and RFC 1731, which described the authentication mechanism for IMAP 4. IMAP 4 is the most recent and extensively used version of IMAP. It is still being developed, and the most recent version is known as IMAP4rev1 and is defined in RFC 2060. RFC 3501 is the most recent revision.
IMAP Features
IMAP was created for a specific purpose: to give users more flexibility in how they access their inbox. It can function in any of the three modes: online, offline, or disconnected. The offline and disconnected modes are of particular importance to most protocol users.
An IMAP protocol has the following characteristics:
● Access and retrieve mail from a distant server: The user can access and retrieve mail from a remote server while keeping the messages there.
● Set message flags: The user can keep track of which messages he has already viewed by setting message flags.
● Manage multiple mailboxes: The user has the ability to manage several mailboxes and transfer messages between them. For those working on numerous projects, the user can categorise them into various categories.
● Determine information prior to downloading: Before downloading the mail from the mail server, it decides whether to retrieve or not.
● Downloads a portion of a message: It allows you to download a component of a message, such as a single body part from the mime-multi part. This is useful when a message's short-text element contains huge multimedia files.
● Search: Users can conduct a search for the contents of emails.
● Check email-header: Examine the email header: Before downloading, users can check the email header.
Advantages
The following are some of the benefits of IMAP:
● It enables us to compose email messages from any location and on as many different devices as we like.
● Only when we click on a message can it be downloaded. As a result, we don't have to wait for the server to download all of our new messages before we can view them.
● With IMAP, attachments are not immediately downloaded. As a result, you can check your messages much faster and have more control over which attachments are accessed.
● IMAP, like the Post Office Protocol, can be utilised offline (POP).
● It allows you to delete messages, search for keywords in the body of emails, create and manage multiple mailboxes or folders, and display the headers of emails for quick visual searches.
Key takeaway
Post Office Protocol, version 3 (POP3) is simple and feature-limited. The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
Internet Message Access Protocol (IMAP) is an acronym for Internet Message Access Protocol. It's an application layer protocol that allows you to receive emails from a mail server.
Web browsers are programmes that are installed on your computer. A web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla Firefox, is required to access the Internet.
Currently, you must navigate through our website tutorialspoint.com using any type of Web browser. Web browsing or web surfing is the process of navigating through pages of information on the Internet.
There are four major web browsers: Internet Explorer, Firefox, Netscape, and Safari, but there are several others. Complete Browser Statistics may be of interest to you. Now we'll take a closer look at these browsers.
We should aim to make a site compatible with as many browsers as feasible when developing it. Especially sites should be adaptable to main browsers like Explorer, Firefox, Chrome, Netscape, Opera, and Safari.
Internet Explorer
Microsoft's Internet Explorer (IE) is a software product. This is the most widely used web browser on the planet. This was debuted in 1995 in conjunction with the release of Windows 95, and it surpassed Netscape in popularity in 1998.
Internet Explorer (also known as IE or MSIE) is a free web browser that allows users to view web pages on the internet. It can also be used to access online banking, internet marketing, listen to and watch streaming videos, and many other things. Microsoft first released it in 1995. It was created in response to Netscape Navigator, the first geographical browser.
For many years, from 1999 to 2012, Microsoft Internet Explorer was the most used web browser, surpassing Netscape Navigator. Network file sharing, multiple internet connections, active Scripting, and security settings are all included.
Google Chrome
Google created this web browser, and the beta version was published on September 2, 2008 for Microsoft Windows. Chrome is now one of the most popular web browsers, with a global market share of more than 50%.
Google Chrome is the most popular open-source internet browser for accessing information on the World Wide Web. It was released on December 11, 2008, by Google for Windows, Linux, Mac OS X, Android, and iOS users. It provides Web security through a sandboxing-based technique. It also adheres to web standards such as HTML5 and CSS (cascading style sheet).
Google Chrome was the first online browser to integrate the search box and address bar, a feature that was quickly replicated by other competitors. Google launched the Chrome Web Store in 2010, allowing users to purchase and install Web-based applications.
Mozilla Firefox
Mozilla has created a new browser called Firefox. It was first introduced in 2004 and has since evolved to become the Internet's second most used browser.
Mozilla Firefox is an open-source web browser that allows users to access information on the Internet. Firefox, the popular Web browser, has a simpler user interface and better download speeds than Internet Explorer. To translate web pages, it employs the Gecko layout engine, which follows current and predicted web standards.
Firefox was popular as a replacement for Internet Explorer 6.0 because it protected users from spyware and harmful websites. After Google Chrome, Apple Safari, and UC Browser, it was the fourth most popular web browser in 2017.
Safari
Safari is an Apple Inc. Web browser that comes standard with Mac OS X. It was originally made available to the public as a public beta in January 2003. Safari offers excellent compatibility for modern technologies like as XHTML and CSS2.
Safari is a web browser for the iPhone, iPad, and iPod Touch, as well as the Macintosh and Windows operating systems. Apple, Inc. Released it on June 30, 2003. It is the primary browser for Apple's operating systems, such as OS X for MacBook and Mac computers and iOS for iPad and iPhone smartphones and tablets. After Microsoft Internet Explorer, Mozilla Firefox, and Google Chrome, it is the fourth most used browser. It makes use of the WebKit engine, which handles font rendering, graphics display, page layout, and JavaScript execution.
Opera
Opera is a full-featured browser that is smaller and faster than most other browsers. With a keyboard interface, numerous windows, zoom functions, and more, it's quick and easy to use. There are Java and non-Java versions available. Ideal for novices to the Internet, schoolchildren, the handicapped, and as a CD-Rom and kiosk front-end.
Konqueror
Konqueror is an HTML 4.01 compliant web browser that also supports Java applets, JavaScript, CSS 1, CSS 2.1, and Netscape plugins. This programme functions as a file manager and offers basic file management on local UNIX filesystems, ranging from simple cut/copy/paste operations to advanced remote and local network file browsing.
Lynx
Lynx is a full-featured Web browser for Unix, VMS, and other platforms with cursor-addressable character-cell terminals or emulators.
Key takeaway
Web browsers are programmes that are installed on your computer. A web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla Firefox, is required to access the Internet.
What is E-mail?
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments. Generally, it is information that is stored on a computer sent through a network to a specified individual or group of individuals.
Email messages are conveyed through email servers; it uses multiple protocols within the TCP/IP suite. For example, SMTP is a protocol, stands for simple mail transfer protocol and used to send messages whereas other protocols IMAP or POP are used to retrieve messages from a mail server. If you want to login to your mail account, you just need to enter a valid email address, password, and the mail servers used to send and receive messages.
Although most of the webmail servers automatically configure your mail account, therefore, you only required to enter your email address and password. However, you may need to manually configure each account if you use an email client like Microsoft Outlook or Apple Mail. In addition, to enter the email address and password, you may also need to enter incoming and outgoing mail servers and the correct port numbers for each one.
Email messages include three components, which are as follows:
● Message envelope: It depicts the email's electronic format.
● Message header: It contains email subject line and sender/recipient information.
● Message body: It comprises images, text, and other file attachments.
The email was developed to support rich text with custom formatting, and the original email standard is only capable of supporting plain text messages. In modern times, email supports HTML (Hypertext markup language), which makes it capable of emails to support the same formatting as websites. The email that supports HTML can contain links, images, CSS layouts, and also can send files or "email attachments" along with messages. Most of the mail servers enable users to send several attachments with each message. The attachments were typically limited to one megabyte in the early days of email. Still, nowadays, many mail servers are able to support email attachments of 20 megabytes or more in size.
In 1971, as a test e-mail message, Ray Tomlinson sent the first e-mail to himself. This email was contained the text "something like QWERTYUIOP." However, the e-mail message was still transmitted through ARPANET, despite sending the e-mail to himself. Most of the electronic mail was being sent as compared to postal mail till 1996.
Differences between email and webmail
The term email is commonly used to describe both browser-based electronic mail and non-browser-based electronic mail today. The AOL and Gmail are browser-based electronic mails, whereas Outlook for Office 365 is non-browser-based electronic mail. However, to define email, a difference was earlier made as a non-browser program that needed a dedicated client and email server. The non-browser emails offered some advantages, which are enhanced security, integration with corporate software platforms, and lack of advertisements.
Uses of email
Email can be used in different ways: it can be used to communicate either within an organization or personally, including between two people or a large group of people. Most people get benefit from communicating by email with colleagues or friends or individuals or small groups. It allows you to communicate with others around the world and send and receive images, documents, links, and other attachments. Additionally, it offers benefit users to communicate with the flexibility on their own schedule.
There is another benefit of using email; if you use it to communicate between two people or small groups that will beneficial to remind participants of approaching due dates and time-sensitive activities and send professional follow-up emails after appointments. Users can also use the email to quickly remind all upcoming events or inform the group of a time change. Furthermore, it can be used by companies or organizations to convey information to large numbers of employees or customers. Mainly, email is used for newsletters, where mailing list subscribers are sent email marketing campaigns directly and promoted content from a company.
Email can also be used to move a latent sale into a completed purchase or turn leads into paying customers. For example, a company may create an email that is used to send emails automatically to online customers who contain products in their shopping cart. This email can help to remind consumers that they have items in their cart and stimulate them to purchase those items before the items run out of stock. Also, emails are used to get reviews by customers after making a purchase. They can survey by including a question to review the quality of service.
History of E-mail
As compared to ARPANet or the Internet, email is much older. The early email was just a small advance, which is known as a file directory in nowadays. It was used to just put a message in other user's directory in the place where they were able to see the message by logging in. For example, the same as leaving a note on someone's desk. Possibly MAILBOX was used at Massachusetts Institute of Technology, which was the first email system of this type from 1965. For sending messages on the same computer, another early program was SNDMSG.
Users were only able to send messages to several users of the same computer through email when the internetworking was not beginning. And, the problem became a little more complex when computers began to talk to each other over networks, we required to put a message in an envelope and address it for the destination.
Later in 1972, Ray Tomlinson invented email to remove some difficulties. Tomlinson worked (Like many of the Internet inventors) for Newman and Bolt Beranek as an ARPANET contractor. To denote sending messages from one computer to another, he picked up the @ symbol from the keyboard. Then, it became easy to send a message to another with the help of Internet standards; they were only required to propose name-of-the-user@name-of-the-computer. One of the first users of the new system was Internet pioneer Jon Postel. Also, describing as a "nice hack," credited goes to Jon Postel.
Although the World Wide Web offers many services, email is the most widely used facility and remains the most important application of the Internet. On the international level, over 600 million people use email. There were hundreds of email users by 1974, as ARPANET ultimately encouraged it. Furthermore, email caused a radical shift in Arpa's purpose, as it became the savior of Arpanet.
From there were rapid developments in the field of the email system. A big enhancement was to sort emails; some email folders for his boss were invented by Larry Roberts. To organize an email, John Vittal developed some software in 1976. By 1976 commercial packages began to appear, and email had really taken off. The email had changed people and took them from Arpanet to the Internet. Here was appeared some interesting features that ordinary people all over the world wanted to use.
Some years later, Ray Tomlinson observed about email. As compared to the previous one, any single development is stepping rapidly and nearly followed by the next. I think that all the developments would take a big revolution.
When personal computers came on the scene, the offline reader was one of the first new developments. Then, email users became able to store their email on their own personal computers with the help of offline reader and read it. Also, without actually being connected to the network, they were able to prepare replies like Microsoft Outlook can do today. In parts of the world, this was specifically useful for people where the telephone was expensive as compared to the email system.
Without being connected to a telephone, it was able to prepare a reply with connection charges of many dollars a minute and then get on the network to send it. Also, it was useful as the offline mode allowed for more simple user interfaces. In this modern time of very few standards being connected directly to the host email system often resulted in no capacity for text to wrap around on the screen of the user's computer, and backspace keys and delete keys may not work and other such annoyances. Offline readers helped out more to overcome these kinds of difficulties.
The SMTP (simple mail transfer protocol) was the first important email standard. It was a fairly naïve protocol that is still in use. And, it was made in terms of no attempt to find the person who sent a message that was the right or not what they claimed to be. In the email addresses, fraudulent was very easy and is still available. Later, these basic flaws were used in the protocol by security frauds, worms and viruses, and spammers forging identities. From 2004, some of these problems are still being processed for a solution.
But as developed email system offered some important features that helped out people to understand easily about email. In 1988, Steve Dorner developed Eudora that was one of the first good commercial systems. But it did not appear for a long time after Pegasus mail come. Servers began to appear as a standard when Internet standards POP (Post office protocol) for email began to mature. Each server was a little different before standard post office protocol (POP). POP was an important standard that allowed users to work together.
Individual dialup users were required to charges for an email per-minute in those days. Also, on the Internet, email and email discussion groups were the main uses for most people. There were several issues on a wide variety of subjects; they became USENET as a body of newsgroups.
With the World Wide Web (WWW), email became available with a simple user interface that was offered by providers like Hotmail and Yahoo. And, users did not require to pay any charges on these platforms. Now everyone wanted at least one email address as it is much simple and affordable, and the medium was adopted by millions of people.
Internet Service Providers (ISPs) started to connect people with each other all over the world by the 1980s. Also, by 1993 the use of the Internet was becoming widespread, and the word electronic mail was replaced by email.
Today, email has become a primary platform to communicate with people all over the world. There are continuing updates to the system with so many people using email for communication. Although email has some security issues, there have been laws passed to prevent the spread of junk email over the years.
Advantages of Email
There are many advantages of email, which are as follows:
● Cost-effective: Email is a very cost-effective service to communicate with others as there are several email services available to individuals and organizations for free of cost. Once a user is online, it does not include any additional charge for the services.
● Email offers users the benefit of accessing email from anywhere at any time if they have an Internet connection.
● Email offers you an incurable communication process, which enables you to send a response at a convenient time. Also, it offers users a better option to communicate easily regardless of different schedules users.
● Speed and simplicity: Email can be composed very easily with the correct information and contacts. Also, minimum lag time, it can be exchanged quickly.
● Mass sending: You can send a message easily to large numbers of people through email.
● Email exchanges can be saved for future retrieval, which allows users to keep important conversations or confirmations in their records and can be searched and retrieved when they needed quickly.
● Email provides a simple user interface and enables users to categorize and filter their messages. This can help you recognize unwanted emails like junk and spam mail. Also, users can find specific messages easily when they are needed.
● As compared to traditional posts, emails are delivered extremely fast.
● Email is beneficial for the planet, as it is paperless. It reduces the cost of paper and helps to save the environment by reducing paper usage.
● It also offers a benefit to attaching the original message at the time you reply to an email. This is beneficial when you get hundreds of emails a day, and the recipient knows what you are talking about.
● Furthermore, emails are beneficial for advertising products. As email is a form of communication, organizations or companies can interact with a lot of people and inform them in a short time.
Disadvantages of Email
● Impersonal: As compared to other forms of communication, emails are less personal. For example, when you talk to anyone over the phone or meeting face to face is more appropriate for communicating than email.
● Misunderstandings: As email includes only text, and there is no tone of voice or body language to provide context. Therefore, misunderstandings can occur easily with email. If someone sends a joke on email, it can be taken seriously. Also, well-meaning information can be quickly typed as rude or aggressive that can impact wrong. Additionally, if someone types with short abbreviations and descriptions to send content on the email, it can easily be misinterpreted.
● Malicious Use: As email can be sent by anyone if they have an only email address. Sometimes, an unauthorized person can send you mail, which can be harmful in terms of stealing your personal information. Thus, they can also use email to spread gossip or false information.
● Accidents Will Happen: With email, you can make fatal mistakes by clicking the wrong button in a hurry. For instance, instead of sending it to a single person, you can accidentally send sensitive information to a large group of people. Thus, the information can be disclosed, when you have clicked the wrong name in an address list. Therefore, it can be harmful and generate big trouble in the workplace.
● Spam: Although in recent days, the features of email have been improved, there are still big issues with unsolicited advertising arriving and spam through email. It can easily become overwhelming and takes time and energy to control.
● Information Overload: As it is very easy to send email to many people at a time, which can create information overload. In many modern workplaces, it is a major problem where it is required to move a lot of information and impossible to tell if an email is important. And, email needs organization and upkeep. The bad feeling is one of the other problems with email when you returned from vacation and found hundreds of unopened emails in your inbox.
● Viruses: Although there are many ways to travel viruses in the devices, email is one of the common ways to enter viruses and infect devices. Sometimes when you get a mail, it might be the virus come with an attached document. And, the virus can infect the system when you click on the email and open the attached link. Furthermore, an anonymous person or a trusted friend or contact can send infected emails.
● Pressure to Respond: If you get emails and you do not answer them, the sender can get annoyed and think you are ignoring them. Thus, this can be a reason to make pressure on your put to keep opening emails and then respond in some way.
● Time Consuming: When you get an email and read, write, and respond to emails that can take up vast amounts of time and energy. Many modern workers spend their most time with emails, which may be caused to take more time to complete work.
● Overlong Messages: Generally, email is a source of communication with the intention of brief messages. There are some people who write overlong messages that can take much time than required.
● Insecure: There are many hackers available that want to gain your important information, so email is a common source to seek sensitive data, such as political, financial, documents, or personal messages. In recent times, there have various high-profile cases occurred that shown how email is insecure about information theft.
Different types of Email
There are many types of email; such are as follows:
● Newsletters: It is studying by Clutch, the newsletter is the most common type of email that are routinely sent to all mailing list subscribers, either daily, weekly, or monthly. These emails often contain from the blog or website, links curated from other sources, and selected content that the company has recently published. Typically, Newsletter emails are sent on a consistent schedule, and they offer businesses the option to convey important information to their client through a single source. Newsletters might also incorporate upcoming events or new, webinars from the company, or other updates.
● Lead Nurturing: Lead-nurturing emails are a series of related emails that marketers use to take users on a journey that may impact their buying behavior. These emails are typically sent over a period of several days or weeks. Lead-nurturing emails are also known as trigger campaigns, which are used for solutions in an attempt to move any prospective sale into a completed purchase and educate potential buyers on the services. These emails are not only helpful for converting emails but also drive engagement. Furthermore, lead-nurturing emails are initiated by a potential buyer taking initial action, such as clicking links on a promotional email or downloading a free sample.
● Promotional emails: It is the most common type of B2B (Business to Business) email, which is used to inform the email list of your new or existing products or services. These types of emails contain creating new or repeat customers, speeding up the buying process, or encouraging contacts to take some type of action. It provides some critical benefits to buyers, such as a free month of service, reduced or omitted fees for managed services, or percentage off the purchase price.
● Standalone Emails: These emails are popular like newsletters emails, but they contain a limitation. If you want to send an email with multiple links or blurbs, your main call-to-action can weaken. Your subscriber may skip your email and move on, as they may click on the first link or two in your email but may not come back to the others.
● Onboarding emails: An onboarding email is a message that is used to strengthen customer loyalty, also known as post-sale emails. These emails receive users right after subscription. The onboarding emails are sent to buyers to familiarize and educate them about how to use a product effectively. Additionally, when clients faced with large-scale service deployments, these emails help them facilitate user adoption.
● Transactional: These emails are related to account activity or a commercial transaction and sent from one sender to one recipient. Some examples of transactional email are purchase confirmations, password reminder emails, and personalized product notifications. These emails are used when you have any kind of e-commerce component to your business. As compared to any other type of email, the transactional email messages have 8x the opens and clicks.
● Plain-Text Emails: It is a simple email that does not include images or graphics and no formatting; it only contains the text. These types of emails may worth it if you try to only ever send fancy formatted emails, text-only messages. According to HubSpot, although people prefer fully designed emails with various images, plain text emails with less HTML won out in every A/B test. In fact, HTML emails contain lower open and click-through rates, and plain text emails can be great for blog content, event invitations, and survey or feedback requests. Even if you do not send plainer emails, but you can boost your open and click through rates by simplifying your emails and including fewer images.
● Welcome emails: It is a type of B2B email and common parts of onboarding emails that help users get acquainted with the brand. These emails can improve subscriber constancy as they include additional information, which helps to the new subscriber in terms of a business objective. Generally, welcome emails are sent to buyers who got a subscription to a business's opt-in activities, such as a blog, mailing list, or webinar. Also, these emails can help businesses to build a better relationship between customers.
What can be sent in an e-mail?
An email is a platform that enables users to communicate with each other. It allows users to send text messages, including a file or other data on the e-mail all over the world. It is also possible to attach a picture, word processor document, PDF, program, movie, or any file stored on your computer in an e-mail. However, due to some security issues, it may not be possible to send certain types of files on the email; they need some additional steps. For example, the .exe file can be blocked by many companies from being sent over the email, and you will need to compress the file into a .zip file format. Additionally, you may be unable to send any large files or programs from being sent over e-mail as most e-mail providers have file size restrictions.
What should be write e-mail?
You can use any word email or e-mail according to the style guide you are following as both are valid and have the same meaning. However, the e-mail word has a hyphen and is a compound noun that describes "electronic" and "mail."
What makes a valid e-mail address?
Users need to follow the various rule that is given below to make valid email address:
● A username followed by @ (the at sign) is most important for an email address, which is followed by the domain name with a domain suffix. Hence, an e-mail must have a username.
● The domain name cannot be longer than 254 characters, and the username cannot be longer than 64 characters long.
● An email must have only one @ sign.
● An email should not have space and special characters like \ [ ] ( ) , : ; < >. Sometimes, few symbols such as backslash, space, and quotation mark work must be preceded with a forward slash. But these characters are not allowed by some email providers.
● In the email, the email address and username cannot start or end with a period.
● The two or more successive periods are not allowed in the email.
E-mail Message Components
E-mail message comprises of different components: E-mail Header, Greeting, Text, and Signature. These components are described in the following diagram:
E-mail Header
The first five lines of an E-mail message is called E-mail header. The header part comprises of following fields:
a) From
b) Date
c) To
d) Subject
e) CC
f) BCC
From
The From field indicates the sender’s address i.e. who sent the e-mail.
Date
The Date field indicates the date when the e-mail was sent.
To
The To field indicates the recipient’s address i.e. to whom the e-mail is sent.
Subject
The Subject field indicates the purpose of e-mail. It should be precise and to the point.
CC
CC stands for Carbon copy. It includes those recipient addresses whom we want to keep informed but not exactly the intended recipient.
BCC
BCC stands for Black Carbon Copy. It is used when we do not want one or more of the recipients to know that someone else was copied on the message.
Greeting
Greeting is the opening of the actual message. Eg. Hi Sir or Hi Guys etc.
Text
It represents the actual content of the message.
Signature
This is the final part of an e-mail message. It includes Name of Sender, Address, and Contact Number.
Key takeaway
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments.
Compose e-mail, Send e-mail
To write and send e-mail with data and messages, do the following:
Step 1: In order to create a new e-mail and send data through it a user has to click on “Compose” option available at the top of inbox option as shown in the picture below.
Step 2: A “New Message” box will appear as you can see in the below picture asking you to enter details in order to create a new e-mail message.
Note: New messages in an e-mail are stored in Inbox folder of the e-mail and all saved messages appears in draft folder of your e-mail.
Here, In the New Message box, you will see the following things:
● To: Mail ID of the recipient
● Cc: To send a Carbon copy i.e., send this mail to several people at the same time and also show everyone the email id’s of all the other people who have received it.
● Bcc: To send a Blind Carbon copy i.e., send this mail to several people at the same time but without showing the person in Bcc list about who else has received this mail.
● Subject: Is the main part which will be shown first to the person receiving the mail. It should be short and relevant to your mail and must tell the reason for your e-mail.
● Body: The body of the e-mail is the blank white part where the user can type his message and can even customise it. In above picture we have written “Hello” to show the body of this e-mail.
● Insert Bar: This bar is available at the bottom of the e-mail compose window. It includes various options to insert document, links, emoji’s, Google drive files, images, signature, delete the email etc.
User simply has to click on one of these options to insert an object and a new window will appear that will ask you about the file location which you want to insert into this mail. After locating the file just click on insert and the file will start uploading to this e-mail, once it is done it can be seen in the e-mail window. You can also open or remove the file from the e-mail using the options available alongside your uploaded file.
Delete button: There is a dustbin icon at the end of this email which lets a user to delete or discard there typed mail. Once discarded the mail cannot be retrieved.
Note: The close option is also available at the top of the window but that option will not delete the e-mail you have typed it simply closes the window and save the typed e-mail in drafts folder for future editing or usage purpose.
Step 3: The send icon is the blue one which is used to send the e-mail once it is composed. All the files inserted along with the text will be sent to the e-mail addresses once the user clicks on this button.
Note: There are various other options available under this Mail compose window such as Print, Schedule send, Minimise and Maximise the window which can be used for better e-mail experience of the user.
File attachment
An email attachment is a file that is sent together with an email from one person to another. Its objective is usually to increase the value or advantage that the email provides to the reader by including additional content that you can't express in the email body. The attachment can be in a variety of formats and sizes, with huge text files, various sorts of documents, spreadsheets, scanned files, forms, photos, and videos being the most common.
What is the best way to write an email with an attachment?
When preparing and sending an email with an attachment, keep these five procedures in mind:
1. Determine what files you wish to send
You should know exactly what file you are intending to transmit and where it is on your device's hard disc or memory drive before sending the email. Knowing what file(s) you're about to send is vital since you'll need to mention them in the email's text, and knowing where they are can help you discover and attach them quickly before sending the email.
2. Write the email's subject line
The subject line of the email is the next step. Because many potential recipients may ignore emails with attachments unless they know what they are, the subject of the email should indicate that it has one or more attachments and provide information about what they are.
3. Compose the email's body
If the attachments are the primary reason for sending an email, the body of the message can just be a brief summary of the files attached. If the attached files are only a small portion of what the email is trying to say, they should be referenced in the body, preferably with a short line that explains what they are. It's not a good idea to send an email with attachments but no text since the recipient or their email provider might think it's spam.
4. Attach the files
Attaching the relevant file or files to the email is the final step before sending it. This stage, however, can happen at any point during the writing and sending procedure. Many senders prefer to attach the files before drafting the email because it reduces the chances of forgetting to do so.
5. Review and send the email
After you've written the subject and content of the email and attached the attachments, you can proofread it before sending it to the recipient.
Attach a file
● Go to Gmail on your PC.
● Click the Compose button.
● Click Attach Attach at the bottom of the page.
● Select the files you'd like to upload.
● Click the Open button.
Remove an attachment
You can remove an attachment after it has been added. Tap Close Close to the right of the attachment name.
Send attachments with confidential mode
- Go to Gmail on your PC.
- Click the Compose button.
- Attach the file by clicking on it.
- Select the files you'd like to upload.
- Turn on confidential mode in the lower right corner of the window. Turn on the private mode.
Tip: To edit an email that has already been set to confidential mode, go to the bottom of the email and select Edit.
6. Set a passcode and an expiration date. Both the message text and any attachments are affected by these parameters.
● If "No SMS passcode" is selected, receivers who use the Gmail app will be able to open it directly. A passcode will be emailed to those who do not use Gmail.
● If you select "SMS passcode," recipients will receive a text message with a passcode. Make sure the recipient's phone number, not your own, is entered.
7. Save the file.
Uploading & downloading
Fig 6: Uploading and downloading
Uploading
If a website accepts file uploads, it will feature an upload tool to assist with the process. This method is handled differently by each site, however we'll provide some instances. The site's help sections will usually assist you through the upload process.
Many websites feature a button that opens a dialogue box when you click it. Facebook, for example, includes a camera icon that starts the uploading process.
You'll be prompted to choose a file in a dialogue window. Navigate to your file's location, pick it, and then click the Open button. Following that, a progress bar will show on the page, tracking the upload process.
A drag-and-drop interface is available on some websites. When logged in to Dropbox, for example, you can drag and drop files from a folder on your computer into the browser window.
Downloading
When you download a file, you usually begin the process by clicking on a link to that file.
When you click the link, your browser should prompt you to choose one of two download options.
● Open with will download the file and open it in the given programme right away.
● It will be downloaded and saved to your hard drive when you click Save File.
The download will commence in either case as you click OK. Your browser will show you how far along the download is and how much time is left.
When the download is finished, the file will either be saved to your computer or opened in the programme you chose. Check try our Finding Your Downloads lesson if you're having problems finding the file after you've downloaded it.
● When you click the link to a file, some browsers don't always start the download process. In these circumstances, right-click the link, choose Save Link As, and then choose a location to save the file.
References:
- Operating System Concepts – Silberschatz, Galvin and Gagne
- Operating System By Godbole
- Linux Bible 9th Edition by Christoper Negus ISBN :978-1-118-99987-5
- Ball, Using Linux, PHI, 1998. ISBN-10: 0789716232
Unit - 2
Shell Programming and Internet
Shell Scripting is a free and open-source programming software that runs on the Unix/Linux shell. Shell Scripting is a program that allows you to write a series of commands to be executed by the shell. It can condense long and repetitive command sequences into a single, simple script that can be saved and executed at any time, reducing programming time.
Shells such as bash and korn in Linux support programming constructs that can be stored as scripts. Many Linux commands are scripted as a result of these scripts being shell commands.
To understand how their servers and applications are started, updated, maintained, or disabled, and to understand how a user interface is designed, a system administrator should have a basic understanding of scripting.
Shells are usually interactive, which means they accept user commands as input and execute them. However, there are times when we need to run a series of commands on a regular basis, and we must type all commands into the terminal each time.
We can write these commands in a file and execute them in shell to avoid this repetitive work because shell can take commands from files as input. Shell Scripts or Shell Programs are the names given to these files. The batch file in MS-DOS is identical to shell scripts. Each shell script has a.sh file extension, such as myscript.sh.
Shell scripts use the same syntax as other programming languages. It will be very simple to get started if you have previous experience with any programming language such as Python, C/C++, or others.
The following elements make up a shell script:
● Shell Keywords – if, else, break etc.
● Shell commands – cd, ls, echo, pwd, touch etc.
● Functions
● Control flow – if..then..else, case and shell loops etc.
Key takeaway
Shell Scripting is a free and open-source programming software that runs on the Unix/Linux shell. Shell Scripting is a program that allows you to write a series of commands to be executed by the shell.
Normally, the shell runs the commands in a script in the order they are written in the text, one after the other.
Frequently, though, you will want to alter the way commands are executed.
Depending on the circumstances, you may want to run one command over and over, or you may want to run a command several times.
The shell provides a number of control mechanisms that can be used to change the order in which commands are executed.
There are two different types of selection mechanisms that allow you to choose between different commands:
● if/then/elif/else/fi
● case
The if statement
The if statement allows you to decide whether to run a command (or a group of commands) based on a condition.
The most basic version of this structure is as follows:
If conditional expression
Then
Command(s)
Fi
When the shell comes across a structure like this, it tests to see if the conditional expression is valid first.
If this is the case, the shell executes any commands found between the then and the fi (which is just if spelled backwards).
The shell skips the commands between then and fi if the conditional expression is false.
Example:
Here's a shell script that makes use of easy if statements:
#!/bin/sh
Set ‘date‘
If test $1 = Fri
Then
Echo "Thank goodness it’s Friday!
Fi
The test commands
In this conditional expression, we used the test instruction.
The phrase is:
Test $1 = Fri
The test command tests to see if the parameter $1 contains Fri; if it does, the condition is valid, and the message is printed.
The test command may run a number of tests; see the documentation for more details.
Using elif and else
Combining the if statement with the elif (“then if”) and else statements allows one to create even more complex selection structures.
Here's an easy example.
#!/bin/sh
Set ‘date‘
If test $1 = Fri
Then
Echo "Thank goodness it’s Friday!"
Elif test $1 = Sat 11 test $1 = Sun
Then
Echo "You should not be here working."
Echo "Log off and go home."
Else
Echo "It is not yet the weekend."
Echo "Get to work!"
Fi
The case Statement
On certain UNIX systems, the shell offers another selection structure that could be faster than the if argument.
This is the case statement, which takes the following form:
Case word in
Patternl) command(s) ;;
Pattern2) command(s) ;;
...
PatternN) command(s) ;;
Esac
The case statement compares word to pattern1, and if the two are equal, the shell executes the command(s) on the first line.
Otherwise, the shell goes through the remaining patterns one by one until it finds one that fits the expression, at which point it executes the command(s) on that line.
The default value is *.
Example:
Here's an example of a basic shell script that employs case statements:
#!/bin/sh
Set ‘date‘
Case $1 in
Fri) echo "Thank goodness it’s Friday!";;
Sat | Sun) echo "You should not be here working"; echo "Log off and go home!";;
*) echo "It is not yet the weekend."; echo "Get to work!";
Esac
For Loops
We sometimes want to repeat a command (or a set of commands).
Iteration, repetition, or looping are terms used to describe this method.
The for loop is the most common shell repetition structure, and it has the following general form:
For variable in list
Do
Command(s)
Done
Example:
Here's an easy example:
#!/bin/sh
For host in $*
Do
Ping $host
Done
While Loops
The while loop is described as follows:
While condition
Do
Command(s)
Done
The commands between the do and the done are executed as long as the condition is true.
Example:
#!/bin/sh
# Print a message ten times
Count=10
While test $count -gt 0
Do
Echo $*
Count=‘expr $count - 1
Done
Until Loops
The until loop is another form of iteration structure.
It takes the following general form:
Until condition
Do
Command
Done
Unless the condition is valid, this loop continues to execute the command(s) between do and done.
Instead of using while loops, we can rewrite the previous script using an until loop:
#!/bin/sh
# Print a message ten times
Count=10
Until test $count -eq 0
Do
Echo $*
Count=‘expr $count
Done
Conditional Execution
The Exit Code of the first command is used in the following two examples to conditionally execute the second command. The logical AND operator, &&, only runs the second command if the first one was good.
$ gcc myprog.c && a.out
If the first command fails, the logical OR operator || executes the second command.
$ gcc myprog.c || echo compilation failed
Continue statement
The continue statement is identical to the break instruction, except that it only exits the current loop iteration, not the entire loop.
If an error occurs, but you still want to attempt to perform the next iteration of the loop, use this expression.
Syntax:
Continue
The continue instruction, like the break statement, can be given an integer argument to skip commands from nested loops.
Continue n
The nth enclosing loop to proceed from is defined by n.
Example:
The continue statement is used in the following loop, which returns from the continue statement and begins processing the next statement.
#!/bin/sh
NUMS="1 2 3 4 5 6 7"
For NUM in $NUMS
Do
Q=expr $NUM % 2
If [ $Q -eq 0 ]
Then
Echo "Number is an even number!!"
Continue
Fi
Echo "Found odd number"
Done
When you run it, you'll get the following result:
Found odd number
Number is an even number!!
Found odd number
Number is an even number!!
Found odd number
Number is an even number!!
Found odd number
Break statement
Since all of the lines of code up to the break statement have been executed, the break statement is used to end the loop's execution. It then descends to the code following the loop's conclusion.
Syntax:
To get out of a loop, use the break statement below.
Break
This format can also be used to exit a nested loop with the break command -
Break n
The nth enclosing loop to exit from is defined by n.
Example:
Here's a simple example that demonstrates how the loop ends when an equals 5.
#!/bin/sh
a=0
While [ $a -lt 10 ]
Do
Echo $a
If [ $a -eq 5 ]
Then
Break
Fi
a=expr $a + 1
Done
When you run it, you'll get the following result:
0
1
2
3
4
5
Here's a simple nested for loop illustration. If var1 equals 2 and var2 equals 0, this script exits all loops.
#!/bin/sh
For var1 in 1 2 3
Do
For var2 in 0 5
Do
If [ $var1 -eq 2 -a $var2 -eq 0 ]
Then
Break 2
Else
Echo "$var1 $var2"
Fi
Done
Done
When you run it, you'll get the following result. You have a break command with the argument 2 in the inner loop. This means that if a condition is met, you can exit the outer loop and eventually the inner loop as well.
1 0
1 5
The read command in Linux is used to read a line's contents into a variable. For Linux systems, this is a built-in command. As a result, we won't need to install any more software. When writing a bash script, it's a simple tool to utilise to get user input. It's a useful tool, just like the echo command and the positional parameter. It's used to separate the words associated with the shell variable. It is mostly used to receive user input, but it can also be used to implement functions while receiving input.
Syntax:
The read command has the following basic syntax:
Read [options] [name...]
How to use the read command?
With and without arguments, the read command can be used. Let's have a look at how the read command might be used in different situations:
● Default Behaviour
If we run the read command without any arguments, it will accept a line as user input and save it in the 'REPLY' built-in variable. Run the command as follows:
Read
The command above will prompt the user for input. To save the user input, type it in and hit the ENTER key. Execute the command as follows to see the entered content:
Echo $REPLY
The above command will display the 'REPLY' variable's stored input.
● Specify the variables to store the values
We can define the variables that will be used to store the data. If the number of provided variables is less than the number of entered words, all leftover words will be stored in the last variable by default. Consider the command below:
Read var1 var2 var3
● read -p
For the prompt text, the '-p' option is used. It reads the data as well as some hints. This tip text guides us through the process of typing text, such as what to type. Consider the command below:
Read -p " Enter your name: "
The command above will prompt you for your name; type it in. The name will be saved in the variable 'REPLY.' Execute the following command to see the variable value:
Echo " My name is $REPLY"
● read -n
The '-n' option shortens the character length in the entered text. It will not allow you to type more than the number of characters specified. It will automatically cease reading after the maximum number of characters has been reached. Execute the following command to limit the number of characters to six:
Read -n 6 -p " Enter 6 characters only: "
We can't enter more than 6 characters with the instruction above.
● read -s
For security reasons, the '-s' option is utilised. It is used to read sensitive information. The entered text will not appear in the terminal if this option is selected. With this option, we can use additional options. In this option, the characters are read aloud. Its primary function is to read passwords from the keyboard. Consider the command below:
Read -s -p "Enter password: "
The above command will demand for a password, but the password will not be displayed on the terminal when we type it.
Echo statement
In Linux, the echo command is used to display a line of text/string that has been supplied as an argument. This is a built-in command that outputs status text to the screen or a file. It's typically used in shell scripts and batch files.
Syntax:
Echo [option] [string]
Displaying a text/string :
Syntax:
Echo [string]
Example:
Echo -e "World \bis \bBeautiful"
Output
Implementations of the echo command
SymbOS, KolibriOS, HP MPE/iX, ReactOS, Microsoft Windows, IBM OS/2, Digital Research FlexOS, Acorn Computers Panos, Microwave OS-9, Zilog Z80-RIO, MetaComCo TRIPOS, TSC FLEX, Multics, Unix-like, and Unix operating systems all provide the echo command.
Several shells, including Csh-like shells (such as zsh or Bash), Bourne-like shells, COMMAND.COM, and cmd.exe, use the echo command as a built-in command.
The command also exists inside the EFI shell.
Echo Command Options
The echo command has a number of different options. The following alternatives are listed and explained:
1. b: Use this option to remove all spaces from the text/string.
Example
Echo -e "Flowers \bare \bBeautiful"
2.\c: This option is used in conjunction with the '-e' backspace interpreter to suppress the trailing new line and continue without emitting any new lines.
Example
Echo -e "World \cis Beautiful"
3. \n: This option is used to generate a new line, which will be formed from the location where it is used.
Example:
Echo -e "World \nis \nBeautiful"
4. Echo *: This option prints every folder or file in the system. It's the same as the Linux ls command.
Example:
Echo *
5. -n: This option is used to skip echoing new lines at the end.
Example:
Echo -n "World is Beautiful"
6. Print "Hello All!" on the terminal: Use the following command to print the text "Hello All!" on the terminal:
Example:
$ echo "Hello All!"
7. Print specified file types: For example, if we want to print every '.c' file, we can use the command below:
Example:
$ echo *.txt
Text editors are used to build Shell Scripts. Open a text editor program on your Linux system, create a new file, and begin typing a shell script or shell programming. Next, grant the shell permission to execute your shell script, and save your script anywhere the shell can find it.
Let's take a look at how to make a Shell Script:
● Using a vi editor, create a file (or any other editor). .sh is the extension for a script file.
● #! /bin/sh is a good way to start the script.
● Make a program.
● Filename.sh is the name of the script file.
● Type bash filename.sh to run the script.
"#!" is a shebang operator that sends the script to the interpreter's position. The script is guided to the bourne-shell if we use "#! /bin/sh."
Let's make a quick script -
#!/bin/bash
# My first script
Echo "Hello World!"
Fig 1: Steps to create shell scripting in linux
Generating output:
The read command is used in the following script to take input from the keyboard, allocate it to the variable Individual, and finally print it on STDOUT.
#!/bin/sh
# Author: Zara Ali
# Copyright (c) Tutorialspoint.com
# Script follows here:
Echo "What is your name?"
Read PERSON
Echo "Hello, $PERSON"
Output:
Here's an example of the script in action:
$./test.sh
What is your name?
Zara Ali
Hello, Zara Ali
$
Example:
The wc command in Bash is used to count a file's total number of lines, sentences, and characters. To generate the output, this command uses the options -c, -w, and -l, as well as the argument filename. To test the next script, create a text file called fruits.txt with the following details. Text file
Fruits.txt
Mango
Orange
Banana
Grape
Guava
Apple
To count and store the total number of words in the fruits.txt file into a variable, $count words, and print the value using the echo command, run the following commands.
$ count_words=wc -w fruits.txt
$ echo "Total words in fruits.txt is $count_words"
Output:
Key takeaway
Text editors are used to build Shell Scripts. Open a text editor program on your Linux system, create a new file, and begin typing a shell script or shell programming. Next, grant the shell permission to execute your shell script, and save your script anywhere the shell can find it.
Alternative name to internet is either the net or web.
● The internet is also considered a Superhighway for transmitting information.
● It is the largest network in the world that connects hundreds of thousands of individual networks all over the world. The Internet moves your ideas and information from one place to another place.
Fig 2: Internet
How to access the Internet
● The Internet utilizes the TCP/IP protocol and is accessed using a computer modem, broadband network that is connected through an ISP (Internet Service Provider).
● An Internet Service Provider (ISP) is an organization which provides services for accessing and using the internet.
● In the case of broadband, many computers use Wi-Fi to connect to router that is connected to the ISP.
● Many of the institutes, schools and businesses have direct access to the Internet using special high-speed communication lines and equipment.
● Students and employees can access through the organization’s Local Area Networks (LAN) or through their own personal computers.
● As the Internet contains billions of web pages created by different companies from around the world, the search engine is used for finding information on the Internet.
Uses of the Internet:
● Files, pictures, songs, and video can be shared by downloading (receiving) and uploading (sending).
● Send e-mail messages.
● The Internet is also used for communicating with others through social networks, online games, forums, chat, e-mails etc.
● Participate in discussion groups, such as mailing lists and newsgroups.
● Surfing the web.
● To make life more convenient internet also provides thousands of services. For example, many financial Companies offer online banking that enables a user to manipulate and view their account online.
Key takeaway
The internet is also considered a Superhighway for transmitting information.
It is the largest network in the world that connects hundreds of thousands of individual networks all over the world. The Internet moves your ideas and information from one place to another place.
It is an interconnected computer network system that spans the globe. It makes use of the TCP/IP protocol, which is widely used on the internet. A unique IP address is assigned to every machine on the Internet. An IP Address (for example, 110.22.33.114) is a series of integers that identify the location of a computer.
A DNS (Domain Name Server) computer is used to give an IP Address a name so that a user can find a computer by name.
ARPANET was expanded to connect the Department of Defense with US colleges conducting defense-related research. It included most of the country's major universities. When University College London (UK) and Royal Radar Network (Norway) joined to the ARPANET and formed a network of networks, the concept of networking received a boost.
Stanford University's Vinton Cerf, Yogen Dalal, and Carl Sunshine invented the name "internet" to characterize this network of networks. They also collaborated on protocols to make information sharing via the Internet easier. The Transmission Control Protocol (TCP) is still the networking's backbone.
In the 1960s, the Internet was created as a means for government researchers to communicate information. In the 1960s, computers were enormous and stationary, and in order to access information stored on them, one had to either travel to the computer's location or have magnetic computer tapes transported through the mail system.
The escalation of the Cold War was another factor in the development of the Internet. The launch of the Sputnik satellite by the Soviet Union prompted the United States Defense Department to examine how information may be distributed even after a nuclear attack. This eventually led to the creation of the ARPANET (Advanced Research Projects Agency Network), which eventually evolved into the Internet we know today.
ARPANET was a huge success, but it was only open to a few academic and research institutions with Defense Department contracts. As a result, new networks were formed to facilitate information sharing.
The Internet celebrates its formal birthday on January 1, 1983. Prior to this, there was no standard means for computer networks to communicate with one another. Transfer Control Protocol/Internetwork Protocol (TCP/IP) was created as a new communication protocol.
This allowed various types of computers on various networks to "speak" to one another. On January 1, 1983, ARPANET and the Defense Data Network switched to the TCP/IP standard, resulting in the birth of the Internet. A universal language could now connect all networks.
Key takeaway
In the 1960s, the Internet was created as a means for government researchers to communicate information.
In the 1960s, computers were enormous and stationary, and in order to access information stored on them, one had to either travel to the computer's location or have magnetic computer tapes transported through the mail system.
Simple Mail Transfer Protocol (SMTP)
E-mail system is implemented with the help of Message Transfer Agents (MTA). There are normally two MTAs in each mailing system. One for sending e-mails and another for receiving e-mails. The formal protocol that defines the MTA client and server in the internet is called Simple Mail Transfer Protocol (SMTP).
Fig shows the range of SMTP protocol.
By referring the above diagram, we can say that SMTP is used two times. That is between the sender and sender’s mail server and between the sender’s mail server and receiver’s mail server. Another protocol is used between the receiver’s mail server and receiver.
SMTP simply defines how commands and responses must be sent back and forth.
SMTP is a simple ASCII protocol
It establishes a TCP connection between a sender and port number 25 of the receiver. No checksums are generally required because TCP provides a reliable byte stream. After exchanging all the e-mail, the connection is released.
Commands and Responses
SMTP uses commands and responses to transfer messages between an MTA client and MTA server.
Each command or reply is terminated by a two-character (carriage return and line feed) end-of-line token.
Fig 3: Commands and Responses
Commands
Client sends commands to the server. SMTP defines 14 commands. Out of that first 5 commands are mandatory; every implementation must support these commands.
The next three commands are often used and are highly recommended. Last six commands are hardly used.
Following table shows FTP commands.
Table:
Keyword | Description |
HELO | Used by the client to identify itself. The argument is domain name of the client host. The format is: HELO: mail.viit.ac.in |
MAIL FROM | Used by the client to identify the sender of the message. The argument is email address of the sender. The format is MAIL FROM: amol.dhumane@gmail.com |
RCPT TO | Used by the client to identify the intended recipient of the message. The argument is the email address of the recipient. The format is: RCPT TO: ashwini.dhumane@yahoo.co.in |
DATA | This command is used to send the actual message. The lines following DATA command are treated as mail message. The format is: DATA There is an important meeting on this Sunday. So please be present for it. Regards; Nitin Sakhare |
QUIT | It terminates the message. The format is: QUIT |
RSET | It aborts the current email transaction. The stored information of the sender and receiver is deleted after executing the command. The connection gets reset. The format is: RSET |
VRFY | This command is used to verify the address of the recipient. In this sender asks the receiver to confirm that a name identifies a valid recipient. Its format is: VRFY: sai@puneatoz.net |
NOOP | By using this command, the client checks the status of the recipient. It requires an answer from recipient. Its format is: NOOP |
TURN | It reverses the role of sender and receiver. |
EXPN | It asks the receiving host to expand the mailing list. |
HELP | It sends system specific documentation. The format is: HELP: mail
|
SEND FROM | This command specifies that the mail is to be delivered to the terminal of the recipient, and not the mailbox. If the recipient is not logged in, the mail is bounced back. The argument is the address of the sender. The format is: SEND FROM: amol.dhumane@gmail.com |
SMOL FROM | This command specifies to send the mail to the terminal if possible, otherwise to the mailbox. |
SMAL FROM
FROM | It sends mail to the terminal and mail box. |
SMTP Working
SMTP works in the following three stages:
a) Connection Establishment
b) Message Transfer
c) Connection Termination
These are explained below:
Connection Establishment
Once the TCP connection is made on port no. 25, SMTP server starts the connection phase. This phase involves following three steps which are explained in the Fig.
The server tells the client that it is ready to receive mail by using the code 220. If the server is not ready, it sends code 421 which tells that service is not available.
Fig 4: Connection Establishment
Once the server becomes ready to receive the mails, client sends HELO message to identify itself using the domain name address. This is important step which informs the server of the domain name of the client. Remember that during TCP connection establishment, the sender and receiver know each other through their IP addresses.
Server responds with code 250 which tells that the request command is completed. Message Transfer Once the connection has been established, SMTP server sends messages to SMTP receiver.
The messages are transferred in three stages
- A MAIL command identifies the message originator.
- RCPT command identifies the receiver of the message.
- DATA command transfers the message text.
Connection Closing
After the message is transferred successfully, the client terminates the connection. The connection is terminated in two steps The client sends the quit command.
The server responds with code 221 or some other appropriate code. After the connection termination phase, the TCP connection must be closed.
MIME Short for Multipurpose Internet Mail Extensions, a specification for formatting non-ASCII messages so that they can be sent over the Internet.
Many e-mail clients now support MIME, which enables them to send and receive graphics, audio, and video files via the Internet mail system. In addition, MIME supports messages in character sets other than ASCII.
There are many predefined MIME types, such as GIF graphics files and PostScript files. It is also possible to define your own MIME types.
In addition to e-mail applications, Web browsers also support various MIME types. This enables the browser to display or output files that are not in HTML format.
POP
Post Office Protocol, version 3 (POP3) is simple and feature-limited. The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
If the user wants to download e-mails from the mailbox on the mail server, mail access begins with the client. On TCP port 110, the client opens a connection to the server. In order to reach the mailbox, it then sends the user name and password. The user will then, one by one, list and retrieve the mail messages.
There are two modes for POP3: the delete mode and the hold mode. In the delete mode, after each retrieval, the mail is removed from the mailbox. In keep mode, after retrieval, the mail stays in the mailbox. When the user is operating on their permanent device, the delete mode is usually used and after reading or replying, the received mail can be saved and sorted. Normally, the keep mode is used when the user accesses her mail away from her main computer (e.g., a laptop). For later retrieval and organisation, the mail is read but kept in the system.
In some aspects, POP3 is deficient. It does not allow the user to arrange his mail on the server; it is impossible for the user to have multiple folders on the server. (The user will build directories on their own computer, of course.)
Fig 5: Command and response of POP3
Advantages of POP3
- As they are already saved on our PC, it provides easy and simple access to the emails.
- The size of the email that we receive or send has no limit.
- When all emails are saved on the local computer, it takes less server storage space.
- The maximum size of a mailbox is available, but the size of the hard disc is limited.
- It is a straightforward protocol, so it is one of the most common protocols used today.
- Configuring and using it is simple.
Disadvantages of POP3
- By default, if the emails are downloaded from the server, all the emails are deleted from the server. Mails will also not be accessed from other computers unless they are programmed to leave a mail copy on the server.
- It can be tough to move the mail folder from the local computer to another machine.
- As all of the attachments are placed on your local computer, if the virus scanner does not scan them, there is a high chance of a virus attack. Virus attacks can destroy your machine.
- There could also be corruption in the email folder that is downloaded from the mail server.
- Mails are saved on a local server, so the email folder can be accessed by someone who is sitting on your machine.
Key takeaway:
● Post Office Protocol, version 3 is simple and feature-limited.
● The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
● In order to reach the mailbox, it then sends the user name and password.
IMAP
Internet Message Access Protocol (IMAP) is an acronym for Internet Message Access Protocol. It's an application layer protocol that allows you to receive emails from a mail server. POP3 is one of the most widely used protocols for retrieving emails.
The client/server model is also used. On the one hand, we have an IMAP client, which is a computer programme. On the other hand, we have an IMAP server, which is likewise a computer-based operation. The two computers are linked through a network.
Because the IMAP protocol is based on the TCP/IP transport layer, it makes use of the protocol's dependability implicitly. The IMAP server listens to port 143 by default whenever a TCP connection is established between the IMAP client and the IMAP server, although this port number can be altered.
IMAP is configured to use two ports by default:
● Port 143: It is a non-encrypted IMAP port.
● Port 993: This port is used when IMAP client wants to connect through IMAP securely.
IMAP History and Standards
IMAP version 2 was the first version of IMAP to be formally documented as an internet standard in RFC 1064, which was published in July 1988. It was modified in August 1990, with the same version, in RFC 1176. As a result, they created IMAP3, a new version 3 document. In February 1991, the RFC 1203 was published. However, because IMAP3 was never embraced by the market, users continued to use IMAP2. IMAPbis, a protocol extension, was later built to add support for Multipurpose Internet Mail Extensions (MIME) to IMAP. Because of MIME's utility, this was a significant advance.
IMAPbis was never published as an RFC, despite this. This could be due to issues with the IMAP3 protocol. IMAP version 4, or IMAP4, was released in two RFCs in December 1994: RFC 1730, which described the basic protocol, and RFC 1731, which described the authentication mechanism for IMAP 4. IMAP 4 is the most recent and extensively used version of IMAP. It is still being developed, and the most recent version is known as IMAP4rev1 and is defined in RFC 2060. RFC 3501 is the most recent revision.
IMAP Features
IMAP was created for a specific purpose: to give users more flexibility in how they access their inbox. It can function in any of the three modes: online, offline, or disconnected. The offline and disconnected modes are of particular importance to most protocol users.
An IMAP protocol has the following characteristics:
● Access and retrieve mail from a distant server: The user can access and retrieve mail from a remote server while keeping the messages there.
● Set message flags: The user can keep track of which messages he has already viewed by setting message flags.
● Manage multiple mailboxes: The user has the ability to manage several mailboxes and transfer messages between them. For those working on numerous projects, the user can categorise them into various categories.
● Determine information prior to downloading: Before downloading the mail from the mail server, it decides whether to retrieve or not.
● Downloads a portion of a message: It allows you to download a component of a message, such as a single body part from the mime-multi part. This is useful when a message's short-text element contains huge multimedia files.
● Search: Users can conduct a search for the contents of emails.
● Check email-header: Examine the email header: Before downloading, users can check the email header.
Advantages
The following are some of the benefits of IMAP:
● It enables us to compose email messages from any location and on as many different devices as we like.
● Only when we click on a message can it be downloaded. As a result, we don't have to wait for the server to download all of our new messages before we can view them.
● With IMAP, attachments are not immediately downloaded. As a result, you can check your messages much faster and have more control over which attachments are accessed.
● IMAP, like the Post Office Protocol, can be utilised offline (POP).
● It allows you to delete messages, search for keywords in the body of emails, create and manage multiple mailboxes or folders, and display the headers of emails for quick visual searches.
Key takeaway
Post Office Protocol, version 3 (POP3) is simple and feature-limited. The POP3 client software is installed on the receiving machine; the POP3 server software is installed on the mail server.
Internet Message Access Protocol (IMAP) is an acronym for Internet Message Access Protocol. It's an application layer protocol that allows you to receive emails from a mail server.
Web browsers are programmes that are installed on your computer. A web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla Firefox, is required to access the Internet.
Currently, you must navigate through our website tutorialspoint.com using any type of Web browser. Web browsing or web surfing is the process of navigating through pages of information on the Internet.
There are four major web browsers: Internet Explorer, Firefox, Netscape, and Safari, but there are several others. Complete Browser Statistics may be of interest to you. Now we'll take a closer look at these browsers.
We should aim to make a site compatible with as many browsers as feasible when developing it. Especially sites should be adaptable to main browsers like Explorer, Firefox, Chrome, Netscape, Opera, and Safari.
Internet Explorer
Microsoft's Internet Explorer (IE) is a software product. This is the most widely used web browser on the planet. This was debuted in 1995 in conjunction with the release of Windows 95, and it surpassed Netscape in popularity in 1998.
Internet Explorer (also known as IE or MSIE) is a free web browser that allows users to view web pages on the internet. It can also be used to access online banking, internet marketing, listen to and watch streaming videos, and many other things. Microsoft first released it in 1995. It was created in response to Netscape Navigator, the first geographical browser.
For many years, from 1999 to 2012, Microsoft Internet Explorer was the most used web browser, surpassing Netscape Navigator. Network file sharing, multiple internet connections, active Scripting, and security settings are all included.
Google Chrome
Google created this web browser, and the beta version was published on September 2, 2008 for Microsoft Windows. Chrome is now one of the most popular web browsers, with a global market share of more than 50%.
Google Chrome is the most popular open-source internet browser for accessing information on the World Wide Web. It was released on December 11, 2008, by Google for Windows, Linux, Mac OS X, Android, and iOS users. It provides Web security through a sandboxing-based technique. It also adheres to web standards such as HTML5 and CSS (cascading style sheet).
Google Chrome was the first online browser to integrate the search box and address bar, a feature that was quickly replicated by other competitors. Google launched the Chrome Web Store in 2010, allowing users to purchase and install Web-based applications.
Mozilla Firefox
Mozilla has created a new browser called Firefox. It was first introduced in 2004 and has since evolved to become the Internet's second most used browser.
Mozilla Firefox is an open-source web browser that allows users to access information on the Internet. Firefox, the popular Web browser, has a simpler user interface and better download speeds than Internet Explorer. To translate web pages, it employs the Gecko layout engine, which follows current and predicted web standards.
Firefox was popular as a replacement for Internet Explorer 6.0 because it protected users from spyware and harmful websites. After Google Chrome, Apple Safari, and UC Browser, it was the fourth most popular web browser in 2017.
Safari
Safari is an Apple Inc. Web browser that comes standard with Mac OS X. It was originally made available to the public as a public beta in January 2003. Safari offers excellent compatibility for modern technologies like as XHTML and CSS2.
Safari is a web browser for the iPhone, iPad, and iPod Touch, as well as the Macintosh and Windows operating systems. Apple, Inc. Released it on June 30, 2003. It is the primary browser for Apple's operating systems, such as OS X for MacBook and Mac computers and iOS for iPad and iPhone smartphones and tablets. After Microsoft Internet Explorer, Mozilla Firefox, and Google Chrome, it is the fourth most used browser. It makes use of the WebKit engine, which handles font rendering, graphics display, page layout, and JavaScript execution.
Opera
Opera is a full-featured browser that is smaller and faster than most other browsers. With a keyboard interface, numerous windows, zoom functions, and more, it's quick and easy to use. There are Java and non-Java versions available. Ideal for novices to the Internet, schoolchildren, the handicapped, and as a CD-Rom and kiosk front-end.
Konqueror
Konqueror is an HTML 4.01 compliant web browser that also supports Java applets, JavaScript, CSS 1, CSS 2.1, and Netscape plugins. This programme functions as a file manager and offers basic file management on local UNIX filesystems, ranging from simple cut/copy/paste operations to advanced remote and local network file browsing.
Lynx
Lynx is a full-featured Web browser for Unix, VMS, and other platforms with cursor-addressable character-cell terminals or emulators.
Key takeaway
Web browsers are programmes that are installed on your computer. A web browser, such as Netscape Navigator, Microsoft Internet Explorer, or Mozilla Firefox, is required to access the Internet.
What is E-mail?
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments. Generally, it is information that is stored on a computer sent through a network to a specified individual or group of individuals.
Email messages are conveyed through email servers; it uses multiple protocols within the TCP/IP suite. For example, SMTP is a protocol, stands for simple mail transfer protocol and used to send messages whereas other protocols IMAP or POP are used to retrieve messages from a mail server. If you want to login to your mail account, you just need to enter a valid email address, password, and the mail servers used to send and receive messages.
Although most of the webmail servers automatically configure your mail account, therefore, you only required to enter your email address and password. However, you may need to manually configure each account if you use an email client like Microsoft Outlook or Apple Mail. In addition, to enter the email address and password, you may also need to enter incoming and outgoing mail servers and the correct port numbers for each one.
Email messages include three components, which are as follows:
● Message envelope: It depicts the email's electronic format.
● Message header: It contains email subject line and sender/recipient information.
● Message body: It comprises images, text, and other file attachments.
The email was developed to support rich text with custom formatting, and the original email standard is only capable of supporting plain text messages. In modern times, email supports HTML (Hypertext markup language), which makes it capable of emails to support the same formatting as websites. The email that supports HTML can contain links, images, CSS layouts, and also can send files or "email attachments" along with messages. Most of the mail servers enable users to send several attachments with each message. The attachments were typically limited to one megabyte in the early days of email. Still, nowadays, many mail servers are able to support email attachments of 20 megabytes or more in size.
In 1971, as a test e-mail message, Ray Tomlinson sent the first e-mail to himself. This email was contained the text "something like QWERTYUIOP." However, the e-mail message was still transmitted through ARPANET, despite sending the e-mail to himself. Most of the electronic mail was being sent as compared to postal mail till 1996.
Differences between email and webmail
The term email is commonly used to describe both browser-based electronic mail and non-browser-based electronic mail today. The AOL and Gmail are browser-based electronic mails, whereas Outlook for Office 365 is non-browser-based electronic mail. However, to define email, a difference was earlier made as a non-browser program that needed a dedicated client and email server. The non-browser emails offered some advantages, which are enhanced security, integration with corporate software platforms, and lack of advertisements.
Uses of email
Email can be used in different ways: it can be used to communicate either within an organization or personally, including between two people or a large group of people. Most people get benefit from communicating by email with colleagues or friends or individuals or small groups. It allows you to communicate with others around the world and send and receive images, documents, links, and other attachments. Additionally, it offers benefit users to communicate with the flexibility on their own schedule.
There is another benefit of using email; if you use it to communicate between two people or small groups that will beneficial to remind participants of approaching due dates and time-sensitive activities and send professional follow-up emails after appointments. Users can also use the email to quickly remind all upcoming events or inform the group of a time change. Furthermore, it can be used by companies or organizations to convey information to large numbers of employees or customers. Mainly, email is used for newsletters, where mailing list subscribers are sent email marketing campaigns directly and promoted content from a company.
Email can also be used to move a latent sale into a completed purchase or turn leads into paying customers. For example, a company may create an email that is used to send emails automatically to online customers who contain products in their shopping cart. This email can help to remind consumers that they have items in their cart and stimulate them to purchase those items before the items run out of stock. Also, emails are used to get reviews by customers after making a purchase. They can survey by including a question to review the quality of service.
History of E-mail
As compared to ARPANet or the Internet, email is much older. The early email was just a small advance, which is known as a file directory in nowadays. It was used to just put a message in other user's directory in the place where they were able to see the message by logging in. For example, the same as leaving a note on someone's desk. Possibly MAILBOX was used at Massachusetts Institute of Technology, which was the first email system of this type from 1965. For sending messages on the same computer, another early program was SNDMSG.
Users were only able to send messages to several users of the same computer through email when the internetworking was not beginning. And, the problem became a little more complex when computers began to talk to each other over networks, we required to put a message in an envelope and address it for the destination.
Later in 1972, Ray Tomlinson invented email to remove some difficulties. Tomlinson worked (Like many of the Internet inventors) for Newman and Bolt Beranek as an ARPANET contractor. To denote sending messages from one computer to another, he picked up the @ symbol from the keyboard. Then, it became easy to send a message to another with the help of Internet standards; they were only required to propose name-of-the-user@name-of-the-computer. One of the first users of the new system was Internet pioneer Jon Postel. Also, describing as a "nice hack," credited goes to Jon Postel.
Although the World Wide Web offers many services, email is the most widely used facility and remains the most important application of the Internet. On the international level, over 600 million people use email. There were hundreds of email users by 1974, as ARPANET ultimately encouraged it. Furthermore, email caused a radical shift in Arpa's purpose, as it became the savior of Arpanet.
From there were rapid developments in the field of the email system. A big enhancement was to sort emails; some email folders for his boss were invented by Larry Roberts. To organize an email, John Vittal developed some software in 1976. By 1976 commercial packages began to appear, and email had really taken off. The email had changed people and took them from Arpanet to the Internet. Here was appeared some interesting features that ordinary people all over the world wanted to use.
Some years later, Ray Tomlinson observed about email. As compared to the previous one, any single development is stepping rapidly and nearly followed by the next. I think that all the developments would take a big revolution.
When personal computers came on the scene, the offline reader was one of the first new developments. Then, email users became able to store their email on their own personal computers with the help of offline reader and read it. Also, without actually being connected to the network, they were able to prepare replies like Microsoft Outlook can do today. In parts of the world, this was specifically useful for people where the telephone was expensive as compared to the email system.
Without being connected to a telephone, it was able to prepare a reply with connection charges of many dollars a minute and then get on the network to send it. Also, it was useful as the offline mode allowed for more simple user interfaces. In this modern time of very few standards being connected directly to the host email system often resulted in no capacity for text to wrap around on the screen of the user's computer, and backspace keys and delete keys may not work and other such annoyances. Offline readers helped out more to overcome these kinds of difficulties.
The SMTP (simple mail transfer protocol) was the first important email standard. It was a fairly naïve protocol that is still in use. And, it was made in terms of no attempt to find the person who sent a message that was the right or not what they claimed to be. In the email addresses, fraudulent was very easy and is still available. Later, these basic flaws were used in the protocol by security frauds, worms and viruses, and spammers forging identities. From 2004, some of these problems are still being processed for a solution.
But as developed email system offered some important features that helped out people to understand easily about email. In 1988, Steve Dorner developed Eudora that was one of the first good commercial systems. But it did not appear for a long time after Pegasus mail come. Servers began to appear as a standard when Internet standards POP (Post office protocol) for email began to mature. Each server was a little different before standard post office protocol (POP). POP was an important standard that allowed users to work together.
Individual dialup users were required to charges for an email per-minute in those days. Also, on the Internet, email and email discussion groups were the main uses for most people. There were several issues on a wide variety of subjects; they became USENET as a body of newsgroups.
With the World Wide Web (WWW), email became available with a simple user interface that was offered by providers like Hotmail and Yahoo. And, users did not require to pay any charges on these platforms. Now everyone wanted at least one email address as it is much simple and affordable, and the medium was adopted by millions of people.
Internet Service Providers (ISPs) started to connect people with each other all over the world by the 1980s. Also, by 1993 the use of the Internet was becoming widespread, and the word electronic mail was replaced by email.
Today, email has become a primary platform to communicate with people all over the world. There are continuing updates to the system with so many people using email for communication. Although email has some security issues, there have been laws passed to prevent the spread of junk email over the years.
Advantages of Email
There are many advantages of email, which are as follows:
● Cost-effective: Email is a very cost-effective service to communicate with others as there are several email services available to individuals and organizations for free of cost. Once a user is online, it does not include any additional charge for the services.
● Email offers users the benefit of accessing email from anywhere at any time if they have an Internet connection.
● Email offers you an incurable communication process, which enables you to send a response at a convenient time. Also, it offers users a better option to communicate easily regardless of different schedules users.
● Speed and simplicity: Email can be composed very easily with the correct information and contacts. Also, minimum lag time, it can be exchanged quickly.
● Mass sending: You can send a message easily to large numbers of people through email.
● Email exchanges can be saved for future retrieval, which allows users to keep important conversations or confirmations in their records and can be searched and retrieved when they needed quickly.
● Email provides a simple user interface and enables users to categorize and filter their messages. This can help you recognize unwanted emails like junk and spam mail. Also, users can find specific messages easily when they are needed.
● As compared to traditional posts, emails are delivered extremely fast.
● Email is beneficial for the planet, as it is paperless. It reduces the cost of paper and helps to save the environment by reducing paper usage.
● It also offers a benefit to attaching the original message at the time you reply to an email. This is beneficial when you get hundreds of emails a day, and the recipient knows what you are talking about.
● Furthermore, emails are beneficial for advertising products. As email is a form of communication, organizations or companies can interact with a lot of people and inform them in a short time.
Disadvantages of Email
● Impersonal: As compared to other forms of communication, emails are less personal. For example, when you talk to anyone over the phone or meeting face to face is more appropriate for communicating than email.
● Misunderstandings: As email includes only text, and there is no tone of voice or body language to provide context. Therefore, misunderstandings can occur easily with email. If someone sends a joke on email, it can be taken seriously. Also, well-meaning information can be quickly typed as rude or aggressive that can impact wrong. Additionally, if someone types with short abbreviations and descriptions to send content on the email, it can easily be misinterpreted.
● Malicious Use: As email can be sent by anyone if they have an only email address. Sometimes, an unauthorized person can send you mail, which can be harmful in terms of stealing your personal information. Thus, they can also use email to spread gossip or false information.
● Accidents Will Happen: With email, you can make fatal mistakes by clicking the wrong button in a hurry. For instance, instead of sending it to a single person, you can accidentally send sensitive information to a large group of people. Thus, the information can be disclosed, when you have clicked the wrong name in an address list. Therefore, it can be harmful and generate big trouble in the workplace.
● Spam: Although in recent days, the features of email have been improved, there are still big issues with unsolicited advertising arriving and spam through email. It can easily become overwhelming and takes time and energy to control.
● Information Overload: As it is very easy to send email to many people at a time, which can create information overload. In many modern workplaces, it is a major problem where it is required to move a lot of information and impossible to tell if an email is important. And, email needs organization and upkeep. The bad feeling is one of the other problems with email when you returned from vacation and found hundreds of unopened emails in your inbox.
● Viruses: Although there are many ways to travel viruses in the devices, email is one of the common ways to enter viruses and infect devices. Sometimes when you get a mail, it might be the virus come with an attached document. And, the virus can infect the system when you click on the email and open the attached link. Furthermore, an anonymous person or a trusted friend or contact can send infected emails.
● Pressure to Respond: If you get emails and you do not answer them, the sender can get annoyed and think you are ignoring them. Thus, this can be a reason to make pressure on your put to keep opening emails and then respond in some way.
● Time Consuming: When you get an email and read, write, and respond to emails that can take up vast amounts of time and energy. Many modern workers spend their most time with emails, which may be caused to take more time to complete work.
● Overlong Messages: Generally, email is a source of communication with the intention of brief messages. There are some people who write overlong messages that can take much time than required.
● Insecure: There are many hackers available that want to gain your important information, so email is a common source to seek sensitive data, such as political, financial, documents, or personal messages. In recent times, there have various high-profile cases occurred that shown how email is insecure about information theft.
Different types of Email
There are many types of email; such are as follows:
● Newsletters: It is studying by Clutch, the newsletter is the most common type of email that are routinely sent to all mailing list subscribers, either daily, weekly, or monthly. These emails often contain from the blog or website, links curated from other sources, and selected content that the company has recently published. Typically, Newsletter emails are sent on a consistent schedule, and they offer businesses the option to convey important information to their client through a single source. Newsletters might also incorporate upcoming events or new, webinars from the company, or other updates.
● Lead Nurturing: Lead-nurturing emails are a series of related emails that marketers use to take users on a journey that may impact their buying behavior. These emails are typically sent over a period of several days or weeks. Lead-nurturing emails are also known as trigger campaigns, which are used for solutions in an attempt to move any prospective sale into a completed purchase and educate potential buyers on the services. These emails are not only helpful for converting emails but also drive engagement. Furthermore, lead-nurturing emails are initiated by a potential buyer taking initial action, such as clicking links on a promotional email or downloading a free sample.
● Promotional emails: It is the most common type of B2B (Business to Business) email, which is used to inform the email list of your new or existing products or services. These types of emails contain creating new or repeat customers, speeding up the buying process, or encouraging contacts to take some type of action. It provides some critical benefits to buyers, such as a free month of service, reduced or omitted fees for managed services, or percentage off the purchase price.
● Standalone Emails: These emails are popular like newsletters emails, but they contain a limitation. If you want to send an email with multiple links or blurbs, your main call-to-action can weaken. Your subscriber may skip your email and move on, as they may click on the first link or two in your email but may not come back to the others.
● Onboarding emails: An onboarding email is a message that is used to strengthen customer loyalty, also known as post-sale emails. These emails receive users right after subscription. The onboarding emails are sent to buyers to familiarize and educate them about how to use a product effectively. Additionally, when clients faced with large-scale service deployments, these emails help them facilitate user adoption.
● Transactional: These emails are related to account activity or a commercial transaction and sent from one sender to one recipient. Some examples of transactional email are purchase confirmations, password reminder emails, and personalized product notifications. These emails are used when you have any kind of e-commerce component to your business. As compared to any other type of email, the transactional email messages have 8x the opens and clicks.
● Plain-Text Emails: It is a simple email that does not include images or graphics and no formatting; it only contains the text. These types of emails may worth it if you try to only ever send fancy formatted emails, text-only messages. According to HubSpot, although people prefer fully designed emails with various images, plain text emails with less HTML won out in every A/B test. In fact, HTML emails contain lower open and click-through rates, and plain text emails can be great for blog content, event invitations, and survey or feedback requests. Even if you do not send plainer emails, but you can boost your open and click through rates by simplifying your emails and including fewer images.
● Welcome emails: It is a type of B2B email and common parts of onboarding emails that help users get acquainted with the brand. These emails can improve subscriber constancy as they include additional information, which helps to the new subscriber in terms of a business objective. Generally, welcome emails are sent to buyers who got a subscription to a business's opt-in activities, such as a blog, mailing list, or webinar. Also, these emails can help businesses to build a better relationship between customers.
What can be sent in an e-mail?
An email is a platform that enables users to communicate with each other. It allows users to send text messages, including a file or other data on the e-mail all over the world. It is also possible to attach a picture, word processor document, PDF, program, movie, or any file stored on your computer in an e-mail. However, due to some security issues, it may not be possible to send certain types of files on the email; they need some additional steps. For example, the .exe file can be blocked by many companies from being sent over the email, and you will need to compress the file into a .zip file format. Additionally, you may be unable to send any large files or programs from being sent over e-mail as most e-mail providers have file size restrictions.
What should be write e-mail?
You can use any word email or e-mail according to the style guide you are following as both are valid and have the same meaning. However, the e-mail word has a hyphen and is a compound noun that describes "electronic" and "mail."
What makes a valid e-mail address?
Users need to follow the various rule that is given below to make valid email address:
● A username followed by @ (the at sign) is most important for an email address, which is followed by the domain name with a domain suffix. Hence, an e-mail must have a username.
● The domain name cannot be longer than 254 characters, and the username cannot be longer than 64 characters long.
● An email must have only one @ sign.
● An email should not have space and special characters like \ [ ] ( ) , : ; < >. Sometimes, few symbols such as backslash, space, and quotation mark work must be preceded with a forward slash. But these characters are not allowed by some email providers.
● In the email, the email address and username cannot start or end with a period.
● The two or more successive periods are not allowed in the email.
E-mail Message Components
E-mail message comprises of different components: E-mail Header, Greeting, Text, and Signature. These components are described in the following diagram:
E-mail Header
The first five lines of an E-mail message is called E-mail header. The header part comprises of following fields:
a) From
b) Date
c) To
d) Subject
e) CC
f) BCC
From
The From field indicates the sender’s address i.e. who sent the e-mail.
Date
The Date field indicates the date when the e-mail was sent.
To
The To field indicates the recipient’s address i.e. to whom the e-mail is sent.
Subject
The Subject field indicates the purpose of e-mail. It should be precise and to the point.
CC
CC stands for Carbon copy. It includes those recipient addresses whom we want to keep informed but not exactly the intended recipient.
BCC
BCC stands for Black Carbon Copy. It is used when we do not want one or more of the recipients to know that someone else was copied on the message.
Greeting
Greeting is the opening of the actual message. Eg. Hi Sir or Hi Guys etc.
Text
It represents the actual content of the message.
Signature
This is the final part of an e-mail message. It includes Name of Sender, Address, and Contact Number.
Key takeaway
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments.
Compose e-mail, Send e-mail
To write and send e-mail with data and messages, do the following:
Step 1: In order to create a new e-mail and send data through it a user has to click on “Compose” option available at the top of inbox option as shown in the picture below.
Step 2: A “New Message” box will appear as you can see in the below picture asking you to enter details in order to create a new e-mail message.
Note: New messages in an e-mail are stored in Inbox folder of the e-mail and all saved messages appears in draft folder of your e-mail.
Here, In the New Message box, you will see the following things:
● To: Mail ID of the recipient
● Cc: To send a Carbon copy i.e., send this mail to several people at the same time and also show everyone the email id’s of all the other people who have received it.
● Bcc: To send a Blind Carbon copy i.e., send this mail to several people at the same time but without showing the person in Bcc list about who else has received this mail.
● Subject: Is the main part which will be shown first to the person receiving the mail. It should be short and relevant to your mail and must tell the reason for your e-mail.
● Body: The body of the e-mail is the blank white part where the user can type his message and can even customise it. In above picture we have written “Hello” to show the body of this e-mail.
● Insert Bar: This bar is available at the bottom of the e-mail compose window. It includes various options to insert document, links, emoji’s, Google drive files, images, signature, delete the email etc.
User simply has to click on one of these options to insert an object and a new window will appear that will ask you about the file location which you want to insert into this mail. After locating the file just click on insert and the file will start uploading to this e-mail, once it is done it can be seen in the e-mail window. You can also open or remove the file from the e-mail using the options available alongside your uploaded file.
Delete button: There is a dustbin icon at the end of this email which lets a user to delete or discard there typed mail. Once discarded the mail cannot be retrieved.
Note: The close option is also available at the top of the window but that option will not delete the e-mail you have typed it simply closes the window and save the typed e-mail in drafts folder for future editing or usage purpose.
Step 3: The send icon is the blue one which is used to send the e-mail once it is composed. All the files inserted along with the text will be sent to the e-mail addresses once the user clicks on this button.
Note: There are various other options available under this Mail compose window such as Print, Schedule send, Minimise and Maximise the window which can be used for better e-mail experience of the user.
File attachment
An email attachment is a file that is sent together with an email from one person to another. Its objective is usually to increase the value or advantage that the email provides to the reader by including additional content that you can't express in the email body. The attachment can be in a variety of formats and sizes, with huge text files, various sorts of documents, spreadsheets, scanned files, forms, photos, and videos being the most common.
What is the best way to write an email with an attachment?
When preparing and sending an email with an attachment, keep these five procedures in mind:
1. Determine what files you wish to send
You should know exactly what file you are intending to transmit and where it is on your device's hard disc or memory drive before sending the email. Knowing what file(s) you're about to send is vital since you'll need to mention them in the email's text, and knowing where they are can help you discover and attach them quickly before sending the email.
2. Write the email's subject line
The subject line of the email is the next step. Because many potential recipients may ignore emails with attachments unless they know what they are, the subject of the email should indicate that it has one or more attachments and provide information about what they are.
3. Compose the email's body
If the attachments are the primary reason for sending an email, the body of the message can just be a brief summary of the files attached. If the attached files are only a small portion of what the email is trying to say, they should be referenced in the body, preferably with a short line that explains what they are. It's not a good idea to send an email with attachments but no text since the recipient or their email provider might think it's spam.
4. Attach the files
Attaching the relevant file or files to the email is the final step before sending it. This stage, however, can happen at any point during the writing and sending procedure. Many senders prefer to attach the files before drafting the email because it reduces the chances of forgetting to do so.
5. Review and send the email
After you've written the subject and content of the email and attached the attachments, you can proofread it before sending it to the recipient.
Attach a file
● Go to Gmail on your PC.
● Click the Compose button.
● Click Attach Attach at the bottom of the page.
● Select the files you'd like to upload.
● Click the Open button.
Remove an attachment
You can remove an attachment after it has been added. Tap Close Close to the right of the attachment name.
Send attachments with confidential mode
- Go to Gmail on your PC.
- Click the Compose button.
- Attach the file by clicking on it.
- Select the files you'd like to upload.
- Turn on confidential mode in the lower right corner of the window. Turn on the private mode.
Tip: To edit an email that has already been set to confidential mode, go to the bottom of the email and select Edit.
6. Set a passcode and an expiration date. Both the message text and any attachments are affected by these parameters.
● If "No SMS passcode" is selected, receivers who use the Gmail app will be able to open it directly. A passcode will be emailed to those who do not use Gmail.
● If you select "SMS passcode," recipients will receive a text message with a passcode. Make sure the recipient's phone number, not your own, is entered.
7. Save the file.
Uploading & downloading
Fig 6: Uploading and downloading
Uploading
If a website accepts file uploads, it will feature an upload tool to assist with the process. This method is handled differently by each site, however we'll provide some instances. The site's help sections will usually assist you through the upload process.
Many websites feature a button that opens a dialogue box when you click it. Facebook, for example, includes a camera icon that starts the uploading process.
You'll be prompted to choose a file in a dialogue window. Navigate to your file's location, pick it, and then click the Open button. Following that, a progress bar will show on the page, tracking the upload process.
A drag-and-drop interface is available on some websites. When logged in to Dropbox, for example, you can drag and drop files from a folder on your computer into the browser window.
Downloading
When you download a file, you usually begin the process by clicking on a link to that file.
When you click the link, your browser should prompt you to choose one of two download options.
● Open with will download the file and open it in the given programme right away.
● It will be downloaded and saved to your hard drive when you click Save File.
The download will commence in either case as you click OK. Your browser will show you how far along the download is and how much time is left.
When the download is finished, the file will either be saved to your computer or opened in the programme you chose. Check try our Finding Your Downloads lesson if you're having problems finding the file after you've downloaded it.
● When you click the link to a file, some browsers don't always start the download process. In these circumstances, right-click the link, choose Save Link As, and then choose a location to save the file.
References:
- Operating System Concepts – Silberschatz, Galvin and Gagne
- Operating System By Godbole
- Linux Bible 9th Edition by Christoper Negus ISBN :978-1-118-99987-5
- Ball, Using Linux, PHI, 1998. ISBN-10: 0789716232