Ruby SMTP server library?

Hello,

Is there any library that implements a simple SMTP, allowing me to send
emails directly instead using the service from my web hoster that
requires stupid things like POP3 before SMTP.

···

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's

Lothar Scholz wrote:

Hello,

Is there any library that implements a simple SMTP, allowing me to send
emails directly instead using the service from my web hoster that
requires stupid things like POP3 before SMTP.
  
er... net/smtp in the standard library?

Zach

I'd love to see even the front end of something like that. Just enough of an
SMTP server to receive and email from a client and then let the rest of the
code decide what to do with it (dump it to a file somewhere, or silently
discard would both be valuable).

Kirk Haines

···

On Wednesday 03 August 2005 4:27 pm, Lothar Scholz wrote:

Hello,

Is there any library that implements a simple SMTP, allowing me to send
emails directly instead using the service from my web hoster that
requires stupid things like POP3 before SMTP.

Lothar Scholz wrote:
> Hello,
>
> Is there any library that implements a simple SMTP, allowing me to send
> emails directly instead using the service from my web hoster that
> requires stupid things like POP3 before SMTP.

er... net/smtp in the standard library?

Keep in mind some hosts will reject mail from systems
whose IP's resolve into something that looks too much
like a resedential account.

For ex. my employer has a business DSL account, and
our SMTP server is properly configured (doesn't allow
relaying, etc.) - but some sites refuse to receive
mail from us because they see the "dsl" in our
reverse lookup.

Just FYI . . .

Regards,

Bill

···

From: "Zach Dennis" <zdennis@mktec.com>

Kirk Haines wrote:

···

On Wednesday 03 August 2005 4:27 pm, Lothar Scholz wrote:

Hello,

Is there any library that implements a simple SMTP, allowing me to send
emails directly instead using the service from my web hoster that
requires stupid things like POP3 before SMTP.

I'd love to see even the front end of something like that. Just enough of an SMTP server to receive and email from a client and then let the rest of the code decide what to do with it (dump it to a file somewhere, or silently discard would both be valuable).

Yes. It would be sweet to be able to E-mail an application and have it respond with stats ("Dear program, how are you?"), or encrypt the content and E-mail updates to your running code while away.

James

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

James Britt wrote:

Kirk Haines wrote:

Is there any library that implements a simple SMTP, allowing me to send
emails directly instead using the service from my web hoster that
requires stupid things like POP3 before SMTP.

I'd love to see even the front end of something like that. Just enough of an SMTP server to receive and email from a client and then let the rest of the code decide what to do with it (dump it to a file somewhere, or silently discard would both be valuable).

Yes. It would be sweet to be able to E-mail an application and have it respond with stats ("Dear program, how are you?"), or encrypt the content and E-mail updates to your running code while away.

I think Lothar was asking about the sending end of the transaction. As for the receiving end, any real MTA gives you the ability to specify the delivery agent--deliver to a mailbox, pipe to a process, whatever. It's not Ruby, but it'd be pretty simple to set up Postfix to do just what you said. Postfix is pretty.

Steve

···

On Wednesday 03 August 2005 4:27 pm, Lothar Scholz wrote:

Steven Jenkins wrote:
...

I think Lothar was asking about the sending end of the transaction. As for the receiving end, any real MTA gives you the ability to specify the delivery agent--deliver to a mailbox, pipe to a process, whatever. It's not Ruby, but it'd be pretty simple to set up Postfix to do just what you said. Postfix is pretty.

Ah. Still, I'd like an app that listened on port 25 and knew the HELO, and so on, commands, so that there would be no dependency on some external MTA. (This is probably not so hard to do, maybe more a matter of time; I think at one point I had to go poking around the SMTP protocol so that some bit of code could talk directly to the recipient process.

I've seen some Sendmail stuff that invokes a process, but it always seemed painful to go learn the little quirks of yet another mini-language so that my app can process mail.

(Still, MTAs make handy message queues for inter-app communication.)

James

I send some email newsletters for clients, and have had absolutely no problems
with this. A completely unoptimized single threaded process going to a
completely unoptimized sender, constructing dynamic emails (content is
constructed from a database profile according to recipient data) nets me
about 200 messages sent per minute from my server. I'm just using tmail for
this.

If you are doing a lot of email generation, the efficient way to do it is to
generate the emails and put them out to disk where you can have a seperate
queuing system running multiprocess/multithreaded to submit these to your
sending system (likely a send farm of more than one dedicated sender if you
really do a lot of email). That way your generating throughput isn't
throttled down by your sending throughput, and it gives you more control to
generate when it's convenient and send when it's convenient.

I worked for years in the email business, and I have no doubt that my Ruby
based engine could, when compared to the engine that my last employer still
uses (Java based), compete well in the performance area with theirs (and
completely blow the doors off of their when it comes to ease of constructing
new dynamic emails).

But, I'm going off on a tangent. The point is, I don't see any weakness with
Ruby when it comes to sending email.

Kirk Haines

···

On Thursday 04 August 2005 5:52 am, Lothar Scholz wrote:

Hello James,

>> I think Lothar was asking about the sending end of the transaction.

Exactly. I run into it when i wrote a script yesterday helping me to
send out some mass email. Even with about a few hunderts of email
addresses the current SMTP class is running into problem very soon if
you use foreign SMTP servers.

SMTP is simple, so it should not be hard to code one of these, if nobody has
done it before. I recall a while ago someone released a Ruby project for
creating state engines. At the time, it seemed to me that tool might be a
perfect way to build a simple MTA.

Postfix or that ilk isn't desireable to me because this is something that I
would like to be able to include directly in certain pieces of software, and
no matter how easy or pretty Postfix is, the fact that it's an external
application dependency introduces an additional knot of complexity that I
don't want to introduce.

Thanks,

Kirk Haines

···

On Wednesday 03 August 2005 9:54 pm, James Britt wrote:

Ah. Still, I'd like an app that listened on port 25 and knew the HELO,
and so on, commands, so that there would be no dependency on some
external MTA. (This is probably not so hard to do, maybe more a matter
of time; I think at one point I had to go poking around the SMTP
protocol so that some bit of code could talk directly to the recipient
process.

Hello Kirk,

Exactly. I run into it when i wrote a script yesterday helping me to
send out some mass email. Even with about a few hunderts of email
addresses the current SMTP class is running into problem very soon if
you use foreign SMTP servers.

I send some email newsletters for clients, and have had absolutely no problems
with this. A completely unoptimized single threaded process going to a
completely unoptimized sender, constructing dynamic emails (content is

Well it only works if the owner of the SMTP server to which you
connect with smtp.rb has configured its server well. There are many
hosters that add timeouts, restrict sending emails to 100 per day or
do other things that prevents the effective use of his SMTP server.
If you are bound to one of them you have no choice as to run your own
server and talk to the receiving end yourself.

So i'm not talking about technical ruby problems but about common business
policies to run an email server.

···

--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's