[joomla] Gawd! I hate Drupal!!!
Gary Mort
garyamort at gmail.com
Fri Jun 25 09:33:56 EDT 2010
As my dayjob involves email deliver-ability, I have long loathed the Joomla
Email functionality.
It is extremely basic, locked into specific and downlevel email
libraries[PHPMailer for the longest time was languishing in obscurity and
far outpaced by Swiftmail in functionality. Now the reverse is happening
and new versions of PHPMailer are getting the functionality. Yet still
Joomla is stuck with an old old version of PHPMailer].
Plus it is extremely limiting, in my mind, for a component to send email
directly to users.
To me, a much better model would be as follows:
$userMessage = new JMessage;
$userMessage->setRecipient($joomlaUser);
$userMessage->setSender($joomlaUser);
// HTML message suitable for web or email
$userMessage->setRichHTML('some html formatted email');
// HTML message suitable for Cell or PDA
$userMessage->setBasicHTML('some html formatted message');
//Long Text Message
$userMessage->setLongText('some long text message');
//Medium text message
$userMessage->setMediumText('some short summary message, max of 1024
chars');
//Short text message
$userMessage->setShortText('some short text message, max 230 chars');
//Add some files
$userMessage->attachFile($fileHandle);
// Optionally, set a preferred medium
$force=false;
$preferred='email';
// What kind of message is this? Types could be confirmation, normal, or
batch
$type='normal'
// Send the message
$userMessage->sendMessage($type, $preferred, $force);
So that basically, when you get to the send message part, the message is
saved to a messaging queue table and based on the recipients preference,
they can receive the message in a number of different ways.
If they prefer to receive notices by IM or SMS text message, then you send
them the short text message with a link to the rich html version online.
If they prefer email, then you send a MIME email with the rich HTML and the
basic Text.
If the user has a flag set for text only, and you have a text version send
just the text.
If the user has a flag set for low impact html, or wants an MMS, send the
basic html.
If they prefer private internal message, you can send it to the internal
system, which may trigger a new round of notifications being sent.
[Note: the type of message is important, primarily to differentiate between
batch notices like "a forum thread you posted to has been updated" and "new
content has been added to this section"...and messages like "confirmation of
your order".... For batch notices, one could allow a user to have
additional settings such as "only send me batch notices once an hour or once
a day".... so instead of getting 50 forum update notices, they will get one
notice at the end of the hour the first one is put in the queue with all the
medium text fields appended together].
So, why do I hate drupal? Because someone has already done it!
http://drupal.org/project/messaging
*sigh* Now, I was willing to code all that for my own usage.... but
figured no one else would ever use it.... But if it already exists, there
isn't much reason for me to code it for Joomla.... :-(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/joomla/attachments/20100625/a8fb0b31/attachment.html>
More information about the Joomla
mailing list