RE: Email form letters
by Odud (Pilgrim) on Aug 04, 2000 at 19:39 UTC
|
You could use Net::SMTP to talk to your mail server (Exchange at a guess) - this should work fine although I haven't done this myself from W98. I've used Net::SMTP to talk from Unix to an Exchange server and this works fine. There is an example in the Windows Specifics documentation for ActiveState. If you don't have access to this let me know and I will send it to you. | [reply] |
RE: Email form letters
by nuance (Hermit) on Aug 04, 2000 at 19:40 UTC
|
Have you considered using a word mail merge? It might just save you an awful lot of time.
Update: See below, this is a really bad idea (one of my worse ones).
Nuance
| [reply] |
|
| [reply] |
Re: Email form letters
by sz (Friar) on Aug 05, 2000 at 00:14 UTC
|
Just a follow up...
Using the example (below)in the Active State docs suggested by Odud,
I get a "Bad command of file name" error from DOS. The email, however,
is sent normally.
Stepping through the code in the debugger, I see that the error is
trigged by line 5, which initializes the smtp connection. I realize this may
be as much a Win98 question as a Perl one, but I'm hoping someone can explain
it to me. Thanks again for all your help.
use Net::SMTP;
$smtp = Net::SMTP->new('xp.psych.nyu.edu'); # connect to an SMTP server
$smtp->mail( 'zoubok@psych.nyu.edu' ); # use the sender's address here
$smtp->to('szoubok@flexdesigns.com'); # recipient's address
$smtp->data(); # Start the mail
# Send the header.
#
$smtp->datasend("To: szoubok\@flexdesigns.com\n");
$smtp->datasend("From: zoubok\@psych.nyu.edu\n");
$smtp->datasend("\n");
# Send the body.
$smtp->datasend("Hello, World!\n");
$smtp->dataend(); # Finish sending the mail
$smtp->quit; # Close the SMTP connection
| [reply] |
Re: Email form letters
by merlyn (Sage) on Aug 05, 2000 at 01:45 UTC
|
| [reply] |
Re: Email form letters
by eak (Monk) on Aug 04, 2000 at 19:45 UTC
|
You should be able to send mail from Win98 (but I haven't tried it in that OS) using Net::SMTP. It provides a client interface to the SMTP protocol.
--eric | [reply] |
Re: Email form letters
by Anonymous Monk on Aug 05, 2000 at 02:13 UTC
|
We use blat, which is freeware available from various places, including http://www.interlog.com/~tcharron/blat.html. It makes all the smtp calls for you, you just call blat from perl with the appropriate parameters.
| [reply] |
Re: Email form letters
by Anonymous Monk on Aug 05, 2000 at 08:50 UTC
|
Perhaps you might try looking in your ActivePerl online documentation
Try Start/Programs/ActivePerl/Documentation.
Check out the ActivePerl FAQ - Windows 9X/NT/2000
and try the question:
How do I send email from ActivePerl?
It's in the file ActivePerl-Winfaq4.html
I hate to say it, but RTFM. | [reply] |
Re: Email form letters
by sz (Friar) on Aug 04, 2000 at 20:07 UTC
|
Thanks everyone.
I'll try Net::SMTP and search the Active State docs as well.
nuance-- do you mean email directly from a Word mail merge? How?
Best,
Sergej | [reply] |
|
Well, since you asked I went and checked it out. You can't
easily send email to lots of recipiants from word :-(
I remembered that you can send a document as email, but
it looks like you can't automate it easily. Of course, if
you going to have to go to the bother of writing a Word
macro, then a perl solution is going to be better.
Basically what it comes down to is I was wrong :-(
Nuance
| [reply] |
Sending email from Win98
by infinityandbeyond (Sexton) on Aug 05, 2000 at 07:59 UTC
|
Try using Mail::Sendmail if you're using windows.
- Infinityandbeyond | [reply] |
Re: Email form letters
by sz (Friar) on Aug 07, 2000 at 18:06 UTC
|
Thanks again for the additional options. Off I go to test them...
As for the AM suggestion that I RTFM, he/she should note my follow-up post. The example I used above to test Net::SMTP is, as I noted, precisely from the ActivePerl FAQ. Nonetheless, good advice.
Thanks,
Sergej
| [reply] |