folks
heres hoping that someone here knows his/her TCL :)
How do I send an email via an SMTP server?
I thought a basic sequence of SMTP commands were:
HELO xxx
MAIL from:[EMAIL PROTECTED]
RCPT to:[EMAIL PROTECTED]
DATA
blah blah
.
QUIT
However, the foll: TCL script does not seem to do anything.
proc inform {} {
set s_ptr [socket 172.25.109.216 25]
gets $s_ptr
puts $s_ptr "HELO Me"
puts $s_ptr "MAIL from:[EMAIL PROTECTED]"
puts $s_ptr "RCPT to:[EMAIL PROTECTED]"
puts $s_ptr "DATA"
puts $s_ptr "Here is the summary\n"
puts $s_ptr "Line 2 of the summary\n"
puts $s_ptr "."
puts $s_ptr "quit"
}
The commands, if run from a telnet window seem to work fine.
(I have an SMTP server running at the above IP addr).
Any tips/help greatly appreciated.
regards,
Hans