Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Socket Adapter Calls

Status
Not open for further replies.

forsidd

Programmer
May 23, 2007
3
SE
Hi Guys,

i have a requirement: need to send a email from the map (i am using mercator 6.7), and i should not be using a email adapter, but thru socket adapter. What i need to know is, how to trigger the smtphost command from the map, and then how to receive the code returned by it so that i give the next set of commands.

typically i want to do the following:

test@mcsdev1:test> telnet smtphost.abc.com 25
Trying 192.21.82.26...
Connected to smtphost.abc.com.
Escape character is '^]'.
220 smtphostem01.theabc.com ESMTP Postfix
HELO abc.com
250 smtphostem01.theabc.com
MAIL FROM: test@abc.com
250 2.1.0 Ok
RCPT TO: test1@abc.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: Test Email
Content-Type:text/html
<BODY>test <B> message </BODY>
.
250 2.0.0 Ok: queued as 4FBB5500FE
quit
221 2.0.0 Bye
Connection to smtphost.abc.com closed by foreign host.
test@mcsdev1:test>

1. So now how to first trigger the telnet command thru socket adapters
2. how do i check the response code (220) and then give the next set of commands

Pleased to get any ideas,

thanks,
sid
 
Why do you keep posting the same question and never follow up any of the replies?

You're best off using the email adapter, if this is not available then use something like blat ( or sendmail (
if you can't use these then write a telnet script. the socket adapter is not suitable for what you want to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top