You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Samuel Gomez <e6...@est.fib.upc.edu> on 2008/07/04 18:42:48 UTC
Send mail with Apache
Hello all.
Is there any way of sending e-mail with Apache?
For example, how are mails sent when the ServerAdmin directive (
http://httpd.apache.org/docs/2.0/mod/core.html#serveradmin ) is used?
I was looking around the code but I wasn't able to find when this data
is used to compose and send a mail.
Thank you.
Samuel
Re: Send mail with Apache
Posted by Samuel Gomez <e6...@est.fib.upc.edu>.
Thanks ed.
You realized of the kind of help I need.
In APR docs is explained how to use pipes and as you said, I can try to
use a mail transfer agent. Sounds quite possible.
(I'm quite noob with C and the sort of solutions it allows to achieve,
as you saw.)
Samuel
ed wrote:
> On Fri, 04 Jul 2008 18:42:48 +0200
> Samuel Gomez <e6...@est.fib.upc.edu> wrote:
>
>
>> Is there any way of sending e-mail with Apache?
>>
>> For example, how are mails sent when the ServerAdmin directive (
>> http://httpd.apache.org/docs/2.0/mod/core.html#serveradmin ) is used?
>>
>> I was looking around the code but I wasn't able to find when this
>> data is used to compose and send a mail.
>>
>
> Well, with Apache itself, I don't think there's a routine, since mail
> is implemented differently on different platforms.
>
> I cannot think of a method to deliver mail on a Windows system, mainly
> because it's not got that orientation, first one has to buy exchange ...
>
> Anyway, probably the most likely method is to open a pipe
> to /usr/lib/sendmail or /usr/sbin/sendmail, whatever your religion,
> then write mail to it.
>
>
Re: Send mail with Apache
Posted by ed <ed...@s5h.net>.
On Fri, 04 Jul 2008 18:42:48 +0200
Samuel Gomez <e6...@est.fib.upc.edu> wrote:
> Is there any way of sending e-mail with Apache?
>
> For example, how are mails sent when the ServerAdmin directive (
> http://httpd.apache.org/docs/2.0/mod/core.html#serveradmin ) is used?
>
> I was looking around the code but I wasn't able to find when this
> data is used to compose and send a mail.
Well, with Apache itself, I don't think there's a routine, since mail
is implemented differently on different platforms.
I cannot think of a method to deliver mail on a Windows system, mainly
because it's not got that orientation, first one has to buy exchange ...
Anyway, probably the most likely method is to open a pipe
to /usr/lib/sendmail or /usr/sbin/sendmail, whatever your religion,
then write mail to it.
Re: Send mail with Apache
Posted by ed <ed...@s5h.net>.
On Fri, 04 Jul 2008 20:18:55 +0200
Samuel Gomez <e6...@est.fib.upc.edu> wrote:
> Before opening a TCP connection to the smtp port of the remote server
> and start to cry, I think I will try the solution suggested by ed.
Well, if you do this, you will be relying on network over heads which
could make the user experience very poor (they will be waiting for you
to deliver mail, maybe the receiving server will scan the mail for
viruses etc before the user gets their page to load)...
Re: Send mail with Apache
Posted by Samuel Gomez <e6...@est.fib.upc.edu>.
Thanks Mads.
I just reviewed the functions provided by APR and APR-utils and didn't
notice any friendly way of sending mail.
Before opening a TCP connection to the smtp port of the remote server
and start to cry, I think I will try the solution suggested by ed.
Samuel
Mads Toftum wrote:
> On Fri, Jul 04, 2008 at 06:42:48PM +0200, Samuel Gomez wrote:
>
>> For example, how are mails sent when the ServerAdmin directive (
>> http://httpd.apache.org/docs/2.0/mod/core.html#serveradmin ) is used?
>>
>> I was looking around the code but I wasn't able to find when this data is
>> used to compose and send a mail.
>>
>>
> That's because it isn't used to send mail. It is merely for
> informational display on error pages.
>
> vh
>
> Mads Toftum
>
Re: Send mail with Apache
Posted by Mads Toftum <ma...@toftum.dk>.
On Fri, Jul 04, 2008 at 06:42:48PM +0200, Samuel Gomez wrote:
> For example, how are mails sent when the ServerAdmin directive (
> http://httpd.apache.org/docs/2.0/mod/core.html#serveradmin ) is used?
>
> I was looking around the code but I wasn't able to find when this data is
> used to compose and send a mail.
>
That's because it isn't used to send mail. It is merely for
informational display on error pages.
vh
Mads Toftum
--
http://soulfood.dk