Talking to Sendmail
Talking directly to sendmail.
You can use telnet to talk directly to sendmail. This allows you to create mail from a different account. Sendmail uses port 25 by default.
$ telnet your.mailserver.address.com 25
You should get an introductory message from sendmail.
> helo your.domain.com
Sendmail responds with address details and ‘pleased to meet you’
> mail from: person@address.mail.is.from.com
Sendmail should echo back the sender address and ‘sender OK’
> rcpt to: person@address.to.send.message.to.com
Sendmail should again echo the address and ‘recipient OK’
> data
Sendmail responds with something like ‘Enter mail, end with “.” on a line by itself’
> subject: enter your subject line here
> and then type in the body of
> your message. End the message
> with . as instructed.
> .
Sendmail responds with ‘message accepted for delivery’ (hopefully
Quit your telnet session by typing Ctrl-], then ‘quit’ at the telnet prompt.
Note, this procedure will also work with MS Exchange Server, although some of the responses are different.