[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    RE: [apache-modules] A module that emails?
From:       "Anthony Wells" <awells () cd-crafters ! com>
Date:       2004-09-07 16:15:46
Message-ID: KEEDKLCNPJCOGNOFCFMAOEGKDMAA.awells () cd-crafters ! com
[Download RAW message or body]

Christian,

I guess you can use C++ for Apache modules.  The function handlers would
have public static modifiers but could easily call C++ functions and create
C++ objects.

I looked over libesmtp.  It's not quite as an elegant solution provided
through SWL and will require a little more coding than I would like but it
will suffice for my form mailer module.  (I am still going to look into a
socket bucket brigade though.)  I'm not sure if I'm up to the challenge of
C++ Apache modules just now.

Anthony

-----Original Message-----
From: Christian Parpart [mailto:cparpart@surakware.net]
Sent: Tuesday, September 07, 2004 6:27 AM
To: apache-modules@covalent.net
Subject: Re: [apache-modules] A module that emails?


On Tuesday 07 September 2004 12:52 am, Anthony Wells wrote:
> Christian,
>
> I looked at your code...it's similiar to something I did in VB way back
> when for screen scraping.
>
> The Network::TNetworkStream class really takes care of a lot of the socket
> overhead for you.  However, because Apache 2.0 is written in C, I can't
> instantiate this class from a module even if it is in a library.  Correct?

Well yes it does :-D. I'm really happy about this ....
However, you still can. TNetworkStream is part of SWL, a C++ framework,
designed to be used on (mostly) any platform, just like APR but in C++. Even
if Apache (including APR) is written in C, you still can use (/depend on)
C++
libraries, so far, I did. My apache module I'm currently writing on is
completely written in C++ *and* is using the SWL framework to
network-connect
to the underlying backend server this modul is just a front-end for.

However, I've just shown you the code to get an inspiration on how *your*
code
might look like. I never intended to force you to use the libs I use ;)

> I think I will investigate using a bucket brigade socket to communicate
> with the SMTP server.  I think this might work, but I'll need to check on
> this. It might be overkill but it'd be nice to use the existing APR.

I'd be interested in your code snippet when it's ready anyway :)

> I will also examine the existance of Linux C based libraries with SMTP
> mailers as well.  If anyone knows of one, let me know.

well.... good question.... You might rather be interested in some MIME libs
that can then be combined with an SMTP mailer?

However, I found a simple SMTP C-client library
http://www.stafford.uklinux.net/libesmtp/

Greets,
Christian Parpart.

--
 12:14:30 up 13 days, 23:54,  0 users,  load average: 0.18, 0.15, 0.19


---------------------------------------------------------------------
To unsubscribe, e-mail: apache-modules-unsubscribe@covalent.net
For additional commands, e-mail: apache-modules-help@covalent.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic