Hi Rene, You are absolutely right. I don't intend to re-invent the wheel. This is a learning curve for me. I would like to understand the ins and outs of smtp better. I have used net::smtp before and its great. But I cannot figure out how to get the module to return server messages so I can see whether the email has been accepted or not. Turning on Debug works but there is too much info.
I could do what I need with ASP's CDOSYS because that will report the error from the smtp server, if any, but I'd like to get away from ASP as its fairly limited unless you move up to .NET which is far too bloated for my needs. I like perl and CGI but I don't know enough yet to do this job. I'll check out your suggestions, especially the sockets, and we'll see. Anyway, thanks again for all you help. Appreciate it, Walter -----Original Message----- From: Rene Schickbauer [mailto:rene.schickba...@gmail.com] Sent: 31 March 2010 18:46 To: walt; Perl Beginners Subject: Re: Connecting to a socket walt wrote: > Thanks Rene, > > I already have an SMTP server running and have been using it with ASP and > CDOSYS. Works like a charm but it's a bit cumbersome and restrictive. So I > am looking into dynamically generating emails from a database to achieve a > more personalized presentation. At the same time I am hoping to use the > server responses to identify and mark email addresses which are rejected by > the server(s) listed in the mx record. That way I'll cut down on the NDRs, > at least that's the theory, and I hope I can iron out some of the problems > this causes in maintaining the opt-in lists. For my part, i just use Mail::Sendmail. Hasn't let me down so far. Of course, your mileage will vary, depending on your exact needs and mail volume. > Then I was hoping to connect to the smtp server, issue the commands one by > one and monitor the server response. My problem is I have never done that so > it's a bit of struggle understanding how to get perl to pick up the server's > response and react accordingly. If you're planning to use this in a production environment, completly re-implementing a mailer might be the wrong choice. For one thing, there are a ton of buggy mail systems out there. And if you're planning to send out anything more sophisticated than plain text mails without attachments, you'll have to worry about encondigs, Mime-types, delimiters, headers, the lot. Not to mention handling temporary server errors, where you probably have to implement spooling, sender notifications, the lot. Before re-inventing the wheel, at least take a look into http://search.cpan.org For your specific problem, at least the socket part, you might wanna take a look into Net::SMTP. It's still pretty lowlevel, but does some wrapping about the low-level socket calls. (of course, reading the RFC's mentioned would still be a good idea). > I'll check out the documentation you have mentioned, look into using > IO::socket and maybe I can ask further questions later on. > > Many thanks Walter. Your welcome! P.S.: Please always reply to the list as well. LG Rene -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/