Firefox PHP

"mail through smtp"-mod :)

Posted by Thomas Seifert 
"mail through smtp"-mod :)
February 29, 2004 05:57PM
Hey folks,

I've done a small "hack" (its not really a mod, isn't it?) of include/email_functions.php.
It uses two Pear-Classes Mail and Mail_Mime to send
the mails from phorum.
So you've got to install these Pear-Classes WITH their dependencies.

Here is the text I've written as comment to the top of the file:

// This is a mod of the original email_functions.php //
// Modified to use the Pear-Classes Mail and Mail::Mime to send mail-messages //
// //
// Most important improvement is that it can directly use SMTP to send mail //
// with another mailserver than the one Phorum runs on, it can even //
// use SMTP-Auth if you need to authenticate to your mailserver. //
// //
// Please be aware! This modded-version is surely NOT faster than the //
// original one. It makes it just simpler for people which need to use an //
// external mailserver. //

Configuration is done through a simple array in the top of the file, maybe someone wants to make an admin-mod to configure it?

You need to extract the file and save the .php-file as include/email_functions.php in your phorum5-distribution.


You can get the first version at:
[www.myphorum.de]

Comments welcome :).


Greets,

Thomas




Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: "mail through smtp"-mod :) - now with queuing
March 01, 2004 10:35PM
And another simple package by me:
---
This is a mod of the original email_functions.php
Modified to use the Pear-Classes Mail, Mail::Mime, Mail::Queue
to send mail-messages later via cron or similar.

Most important improvement is that it can directly use SMTP to send mail
with another mailserver than the one Phorum runs on, it can even
use SMTP-Auth if you need to authenticate to your mailserver.

PLUS in THIS file it just stores the mail-messages in a database to send
them later with a cron-job or similar.
A simple console-script to be run from cron is provided as
send_mail_cron.php

---

[www.myphorum.de]


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
jfd
Re: "mail through smtp"-mod :)
May 25, 2004 06:00PM
Hi,

I've installed your email-fonction Pear on my Phorum 5.0.5
I send mail through my smtp server with authentification.
It's work pretty well, no problem.
I had some difficulties for install pearl functions but once it was working after configuring the array in the top of the file.
Phorum is a nice work and i enjoy it !

Thanks a lot
JFD
Re: "mail through smtp"-mod :)
October 22, 2004 05:30PM
Is it possible to provide the Queuing-Functionality via a real Mod (the Mail_SMTP mod) as well?
Or can you ensure me, that this is an absolutely safe hack, which is (and will be) compatible to all phorum 5 versions? :)
Re: "mail through smtp"-mod :)
October 22, 2004 05:40PM
No, like I told, I don't assure anything on that and called it alpha on my own :).

yes, most parts can be put into a module but not everything i.e. the table needs to be created manually.
it just needs someone who wraps it into a module ;).


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: "mail through smtp"-mod :)
October 22, 2004 06:02PM
The very definition of a hack makes it impossible to say that it will be compatable with *any* future version of Phorum, let alone all of them.

Thats why we recommend things get written as modules.
Re: "mail through smtp"-mod :)
October 22, 2004 06:12PM
And even modules are not guaranteed to be compatible. You should read the sticky that explains the difference between a module and a hack.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Sorry, only registered users may post in this forum.

Click here to login