The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
telnet smtp script bulkbiz Shell Programming and Scripting 4 12-22-2008 07:08 AM
Webpage to Telnet via Perl and Expect: Telnet problem? jondo Shell Programming and Scripting 1 07-22-2008 12:35 AM
telnet smtp and email in batch ejaggers UNIX for Dummies Questions & Answers 1 03-06-2008 05:22 PM
Automating telnet and ftp sendhilmani123 Shell Programming and Scripting 2 04-25-2006 05:37 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 4 Weeks Ago
dukeEarth dukeEarth is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 1
Automating mailing via telnet to smtp

Hi,

I am trying to write a ksh script to send an attachment via telnet to an SMTP server.

I'm using MKS Toolkit. mail, mailx, sendmail, nc are not working on the server where I have MKS Toolkit installed.

If I type the following from the command prompt I receive an email:
Code:
telnet x.com 25
helo a
mail from:Scripts@x.com
rcpt to:i@g.com
data
test
.
But if I use the following then I get the result given below:
Input:
Code:
(sleep 1
echo 'helo a'
sleep 1
echo 'mail from:<scripts@x.com>'
sleep 1
echo "rcpt to:<i@g.com>"
sleep 1
echo "data
test"
sleep 1
echo "."
sleep 1
echo "quit") | telnet x.com 25
Output:
Code:
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'

Microsoft Telnet> echo: writing: The pipe is being closed.
echo: writing: The pipe is being closed.
echo: writing: The pipe is being closed.
echo: writing: The pipe is being closed.
echo: writing: The pipe is being closed.
echo: writing: The pipe is being closed.
$
I am not receiving an e-mail. I want to use ksh because the rest of my script is in ksh.

Please help!

Thanks in advance!

Last edited by pludi; 4 Weeks Ago at 04:20 AM.. Reason: code tags, please...
 

Bookmarks

Tags
ksh, mks toolkit, smtp, telnet

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0