How to use Telnet to test SMTP communication

When you run the commands, replace these values with ones for your SMTP server, sourceDomain, etc.

Destination SMTP server: mail.smtpserver.com
Source domain: dev.prodDomain
Sender’s e-mail address: vinaychauhan@orgName.com
Recipient’s e-mail address: vipinchauhan@anotherOrgName.com
Message subject: Test Mail
Message body: This is a test message

(1) Open a Command Prompt window, type telnet, and then press Enter. This command opens the Telnet session.
(2) Type set localecho, and then press Enter. This optional command lets you view the characters as you type them, and it might be required for some SMTP servers.
(3) Type set logfile <filename>, and then press Enter.This optional command enables logging and specifies the log file for the Telnet session. If you only specify a file name, the log file is located in the current folder. If you specify a path and file name, the path needs to be on the local computer, and you might need to enter the path and file name in the Windows DOS 8.3 format (short name with no spaces). The path needs to exist, but the log file is created automatically.
(4) Type OPEN mail.smtpserver.com 25 and then press Enter.
(5) Type EHLO dev.prodDomain, and then press Enter.
(6) Type MAIL FROM:<vinaychauhan@orgName.com>, and then press Enter.
(7) Type RCPT TO:<vipinchauhan@anotherOrgName.com> NOTIFY=success,failure, and then press Enter. The optional NOTIFY command specifies the particular delivery status notification (DSN) messages (also known as bounce messages, nondelivery reports, or NDRs) that the SMTP is required to provide. In this example, you’re requesting a DSN message for successful or failed message delivery.
(8) Type DATA, and then press Enter.
(9) Type Subject: Test Mail, and then press Enter.
(10) Type This is a test message, and then press Enter.
(11) Type a period ( . ), and then press Enter.
(12) To disconnect from the SMTP server, type QUIT, and then press Enter.
(13) To close the Telnet session, type quit, and then press Enter.

Here’s what a successful session output using the steps above looks like:

C:\> telnet
Microsoft Telnet> set localecho
Microsoft Telnet> set logfile c:\TelnetLog.txt
Microsoft Telnet> OPEN mail.smtpserver.com 25
EHLO dev.prodDomain
250-mail.smtpserver.com Hello [172.16.0.5], pleased to meet you
250-SIZE 37748736
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH NTLM
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 XRDST
MAIL FROM: vinaychauhan@orgName.com
250 2.1.0 Sender OK
RCPT TO: <vipinchauhan@anotherOrgName.com> NOTIFY=success,failure
250 2.1.5 Recipient OK
DATA
354 Start mail input; end with <CRLF>.<CRLF>
Subject: Test Mail

This is a test message.
.
250 2.6.0 <c89b4fcc-3ad1-4758-a1ab-1e820065d622@mail.smtpserver.com> [InternalId=5111011082268, Hostname=mail.smtpserver.com] Queued mail for delivery
QUIT
221 2.0.0 Service closing transmission channel

Advertisements

Useful URL

(403) Forbidden Error Message

There could be a couple of reasons when we can see a (403) Forbidden error message in dynamic web-application. Details for the same could be found at given below URL :-

(1) https://mediatemple.net/community/products/dv/204644980/why-am-i-seeing-a-403-forbidden-error-message

(2) https://en.wikipedia.org/wiki/HTTP_403

However, today in our application we have faced the same scenario wherein we got (403) Forbidden error message while hitting the URL :

http://chauhan:9081/servicesApplication/port/v1_2

After initial investigation, it has been found that due to network/firewall patches, we have to give the full qualified URLs i.e.

Example: http://chauhan.techDomain.com:9081/servicesApplication/port/v1_2 

Enjoy Learning 🙂

Vertical Scaling vs Horizontal Scaling

Vertical Scaling is the addition of extra resources to the servers in a network. For example, a business runs up against storage capacity limits, so they choose to add extra or larger hard drives to their existing servers. It is the old fashioned approach, and it tends to be significantly more expensive than the horizontal scaling we’re going to look at below. If a company expects to be vertically scaling their existing hardware, then that hardware has to be built with the possibility in mind. It has to have excess capacity, extra drive bays, and so on, that will end up sitting idle until the moment of expansion comes. Such hardware tends to be significantly more expensive than commodity hardware: hardware prices don’t scale linearly.

Vertical scaling is also fairly inefficient when it comes to resource reallocation. Because servers tend to be dedicated to particular tasks, it can be hard to reallocate the spare resources of a server to other, more pressing tasks. That’s why virtualization has become so popular.

Horizontal Scaling, on the other hand, involves adding more nodes to the system as it scales, rather than beefing up the existing nodes. This is by far the most popular scaling strategy in modern times. Google, Facebook, and other huge enterprises rely on using many nodes of relatively inexpensive commodity-class hardware, which they can add to and retask as the need arises. Because horizontal scaling is the growth method of choice for very large Internet enterprises, software has been developed that makes distributing file serving, databases, and virtualization across an expanding pool of nodes practical. For example, Google’s Spanner is a distributed database that is designed to scale at globally. The increasingly popular Hadoop software framework has horizontal scaling as a key design principle.

Google Drive @ Scanning Option

Google Drive is one such app that’s has integrated document-scanning and OCR capabilities. Snap a photo of a document and a PDF copy of the document will be saved to Google Drive. It will also use the power of Google’s servers to perform OCR on the documents, making it searchable in your Drive.

To do this, open the Drive app on your phone, open its menu, and tap Add New. Tap the Scan option in the list to scan and upload a document. Note that you could also add the Drive widget to your home screen and tap the camera icon on it to quickly open the Scan interface — this is useful if you frequently want to scan documents.

GoogleDrive_ScanOption
GoogleDrive_ScanOption