Tuesday 5 June 2012

Sending email in your lan network from any existing emails



You can send mail in your lan network not using any gmail connection, if you have linux system with you.
just go to terminal and type

telnet localhost 25

eg: [developer@localhost ~]$ telnet localhost 25
now the server will return like this


Trying 192.168.1.23...
Connected to localhost.localdomain (192.168.1.23).
Escape character is '^]'.
220 localhost.localdomain ESMTP Postfix

now the message from server tells that you are connected to server and we can start our operation
just type
HELO localhost
and now server will return a postive message something like
eg:
250 localhost6.localdomain6 Hello localhost.localdomain [127.0.0.1], pleased to meet you


now type from address that you wish in the lan network

type
MAIL FROM:address@gmail.com

if it is ok then server will send message like
250 2.1.0 Ok

now type the recepient address that you wish
type
RCPT TO:receptaddress@gmail.com

now if it is ok then server will return some message like this
250 2.1.5 Ok

Now it's time to submit content of message type like this :

DATA
press enter the server returns something like
354 End data with <CR><LF>.<CR><LF>

then you can type your message below it like
Subject:HELLo

hello da
.

when you finish your message type . to stop.
now press enter your message will be listed in que of localserver and it will be send soon..

so overall terminal looks something like this :-
[developer@localhost ~]$ telnet localhost 25
Trying 192.168.1.23...
Connected to localhost.localdomain (192.168.1.23).
Escape character is '^]'.
220 localhost.localdomain ESMTP Postfix
HELO localhost
250 localhost.localdomain
MAIL FROM:rcpt@gmail.com
250 2.1.0 Ok
RCPT TO:youraddress@gmail.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject:HELLo

hello da
.
250 2.0.0 Ok: queued as 7195CD7CC6

No comments:

Post a Comment