Perl - SMTP Question 
Author Message
 Perl - SMTP Question

Hello everyone.  First, I'd like to compliment Mr. Wall on his cool
language!  It's been distressingly easy to learn and use thus far.  

First, I'm trying to write a Perl program that will interreact with an
SMTP server to send mail. (Don't ask why I'm not using 'mail'.  It's a
secret) To do this, I thought that I should open() a telnet session for
writing then print standard SMTP commands to that filehandle.  

It looks like I was wrong.  Text from the telnet session is poping up on
the screen and I'm not sure how to block it, and the printed commands do
not seem to be recieved by the server.  Since the filehandle is opened for
writing rather than reading, I'm not sure how to interreact with the
server.  Is it just silly to try to do this over telnet?  Is there a way
to read and write to a filehandle, like waiting for a specific response
before sending the reply?

Secondly, I'm wondering if the documentation for Perl 5 is available in
ASCII rather than postscript somewhere.  I've made it through the
O'Reilly books and I'm wondering what the next step in self-education is.

Thanks!

-Nick



Sun, 23 Nov 1997 03:00:00 GMT  
 Perl - SMTP Question
: Hello everyone.  First, I'd like to compliment Mr. Wall on his cool
: language!  It's been distressingly easy to learn and use thus far.  

: First, I'm trying to write a Perl program that will interreact with an
: SMTP server to send mail. (Don't ask why I'm not using 'mail'.  It's a
: secret)

secret=fakemails?  ;-)

:         To do this, I thought that I should open() a telnet session for
: writing then print standard SMTP commands to that filehandle.  

: It looks like I was wrong.  Text from the telnet session is poping up on
: the screen and I'm not sure how to block it, and the printed commands do
: not seem to be recieved by the server.  Since the filehandle is opened for
: writing rather than reading, I'm not sure how to interreact with the
: server.  Is it just silly to try to do this over telnet?  Is there a way
: to read and write to a filehandle, like waiting for a specific response
: before sending the reply?

I think you will find the expect-package useful. You can run expect from
within perl by printing to EXP after doing open(EXP,"|expect");

: -Nick

--
Kjetil Skotheim



Mon, 24 Nov 1997 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Cannot get authenticated to Yahoo's SMTP servers while sending mail using Net::SMTP

2. SMTP problems with Net::SMTP using WinPerl/WinNT

3. SMTP without Net::Smtp

4. SMTP problems with Net::SMTP using WinPerl/WinNT

5. SMTP Module Question

6. Question about Net::SMTP

7. Net::SMTP-Question

8. Net::Smtp Question

9. Question: How to send large (3+ MB) emails via Net::SMTP or other module

10. questions about Net::SMTP

11. newbie question about Net::SMTP

12. Net::SMTP - Question/Problem

 

 
Powered by phpBB® Forum Software