Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Dec 01, 2007 12:55 am Reply with quote

The following was posted by kguske in the comments of this news article.

I recently needed to implement SMTP for the NukeStyles Contact Plus module. I like it better than Feedback because it allows several different contacts that are stored in a table. Although I did not add CAPTCHA, I slightly modified it to support a parameter that specified which contact so it supports linked contacts without having to select the contact.

I've used both phpmailer and SwiftMailer for different projects, and chose SwiftMailer for this. It's more difficult to implement (though it wouldn't be hard to simplify it, which I think is the point of EasySwift, though I didn't look at that because there is little do*****entation and I was in a hurry). I'm looking into email validation and tested several functions that actually use SMTP to verify the email address is real. Yahoo is the only problem - it says every email address is real, so one of the classes treats any @yahoo.com address as invalid. One of the classes works really well, and I'm looking at integrating it into Contact Plus (to prevent spam).

Anyway, what features are planned (in addition to the obvious SMTP support)?
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Dec 01, 2007 12:55 am Reply with quote

Here was my response:

Quote:

Sorry, did not see this comment come through... odd. Well, you can see it in action within SVN of RavenNuke, but, in a nut-shell, I have combined PHPNukeMailer and Swift Mailer concepts. The admin piece is from PHPNukeMailer - but a major OVERHAUL -- and then created a new mailer function to use as the "interface" to Swift Mailer.

It supports both regular email sends to a single email address or multiples (puts them all on the TO line) as well as the BatchSend function which will send a batch of TO addresses, but an email is sent to each address (better from a spam and privacy standpoint).

The function "interface" is very simplified, but is set up to be able to be expanded through the passing of an array of $params. It can also, through the params, be told to send either text/plain or text/html with plans to also include multi-part and attachments with the PHP5-only version later on.

I also plan in a future release to use several of Swift's advanced features such as: user-defined Iterators, personalization, and special "governing" features (e.g., to only send xx emails per xx seconds/minutes). I am also planning on a more robust "off-line" mailer option to get around the PHP time-out issue.

Give it a try through SVN and let me know what you think.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
kguske
Community Giant



Joined: Dec 11, 2005
Posts: 32

PostPosted: Sat Dec 01, 2007 1:08 am Reply with quote

A quick scan of mail( in SVN highlighted several opportunities for TegoNuke Mailer that weren't identified in PHPNukeMailer:
- admin/modules/nsngroups/NSNGroupsUsersEmailSend.php
- admin/modules/nukesentinel/ABAuthEditSave.php
- admin/modules/nukesentinel/ABAuthListScan.php
- admin/modules/nukesentinel/ABAuthResend.php
- admin/modules/nukesentinel/ABIP2CountryAddSave.php
- admin/modules/nukesentinel/ABIP2CountryDeleteSave.php
- admin/modules/nukesentinel/ABIP2CountryEditSave.php
- includes/nukesentinel.php
- includes/emailer.php
- includes/nsngr_func.php
- modules/Advertising/index.php
- modules/HTML_Newsletter/admin/functions.php (guess you knew this!)
- modules/Resend_Email/index.php
- modules/Your_Account/admin/index.php
---- These 2 notify on last banner impression - this should be built into the banners / advertising functionality
- themes/fisubice/theme.php
- themes/SlashOcean/theme.php

The nukesentinel files appear to be doing a test to see if the mail function is working, and that could possibly be removed / replaced. The others appear to be sending email for specific reasons, and we might want to consider having different SMTP addresses for those functions, although I think having one might be sufficient).

Did you look at the plugin for addressing some servers anti-flood functions? Is that what you meant by the governing feature?

_________________
nukeSEO.com - PHPNuke SEO search engine optimization and other professional tools for PHP-Nuke 
View user's profile Send private message
kguske
Community Giant



Joined: Dec 11, 2005
Posts: 32

PostPosted: Sat Dec 01, 2007 1:14 am Reply with quote

Using Google Mail / Google Apps for email...

I've recently started moving some sites email from the webserver to free Google Apps accounts, which has MANY benefits and few real costs. You can host your email on Google's servers, use Gmail to access email to your domain accounts, and even use POP, IMAP and more for additional access methods. With 5 GB of free space for each account, it's hard to beat (see http://www.google.com/a).

The caveat is that TLS support is required (yes, Swift supports that and PHPMailer does not directly, though there has been some new activity with PHPMailer recently after 2 years of nothing).

In order to support this, we'll need to add extra configuration support in TegoNuke Mailer to use TLS.

_________________
nukeSEO.com - PHPNuke SEO search engine optimization and other professional tools for PHP-Nuke 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Dec 01, 2007 9:59 am Reply with quote

kguske, you need to be looking at the latest SVN because ALL of those scripts, including NukeSentinel, have had TegoNuke Mailer added to them... Everything is done and in the repository and working.

Quote:
Did you look at the plugin for addressing some servers anti-flood functions? Is that what you meant by the governing feature?


No, I have not yet. My focus was strictly on getting the core PHP mail() functions within RN taken care of with giving the webmaster the option of using SMTP (and sendmail).

Once that is released and battle-tested, my plan was to start building upon that. Swift Mailer provides so many opportunities for the future, which is the main reason why I went with it.
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Dec 01, 2007 10:05 am Reply with quote

Regarding

Quote:
Using Google Mail / Google Apps for email...


No, I have not even considered that as yet. To be honest, haven't even looked at the Google Apps... I'm still a little bitter over them... Laughing

Quote:
we'll need to add extra configuration support in TegoNuke Mailer to use TLS.


Configuration support shouldn't be an issue as I have used PHPNukeMailer's admin tool (vastly modified) and can easily add more options there to configure. Plus, I made the parameter passing into TegoNuke Mailer array based so we can add any number of parameters.

My first focus, I think, is going to be HTML Newsletter related as I am considering the features already mentioned above. (Not sure how good Google Mail would be with bulk sends like this? Any thoughts there?)

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Dec 01, 2007 10:21 am Reply with quote

By the way, since I hadn't looked at these in awhile (after deciding to move forward with Swift), I went back and looked. The following Plug-Ins interested me from a HTML Newsletter standpoint and I plan to take full advantage of them:

AntiFlood
Message Decorator
Throttler
Bandwidth Monitoring/Tracking

I mentioned a few of these using different words above, but these are the specific plug-ins.

I am also going to take advantage of these features:
* Ability to create my own Iterators
* Ability to throw/catch errors (PHP5 only - which the direction I am going in)
* Ability to use multi-part emails (useful for spam filters)
* Logging (at least of failed recipient sends)
* Disk caching

I am also considering looking into how to extend or do externally on how to better handle both message bounces and automatic newsletter "opt-outs".

Edited: Sorry, forgot a very important one and top on my list: SSL/TLS support! Less of an issue for PHP-Nuke/RN when we are talking localhost to localhost, but Swift also supports a load balancing approach, and I think it would help to have both standard and secure capabilities.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
kguske
Community Giant



Joined: Dec 11, 2005
Posts: 32

PostPosted: Sat Dec 01, 2007 10:32 am Reply with quote

Sorry - I forgot about your fun with Google...and sorry for not looking at the current version. I was out of town when I did it, and downloaded the 2.10 version as I did not have access to SVN.

On those nukesentinel files, it looked like it was testing to see if the mail function worked. It might be better to make a single function for that so it's easier to tweak, but I know that's Bob's call. What about the logic in the themes to notify advertisers on the last impression? I couldn't see any logic in putting business logic in the theme file...

Google Mail only allows 50 emails at a time, so it's good that you're looking at the bulk function already.

I saw the multi-part stuff and the example of sending HTML and text versions looked especially interesting for newsletters! I didn't get far into the logging of failed recipients, but it might be a great way to update your roster! BTW, I tested a bunch of scripts for validating emails via SMTP, and one worked quite well. I might consider adding to feedback / contact plus and / or registration functions.

Opt outs! Now that sounds like a professional feature! Overall, this sounds very promising! If we can add database support (i.e. store newsletters as data, rather than as HTML files), I would be ecstatic. Sign me up for testing, review, whatever you need. I will start by investigating how we can move the last impression ad notifications out of the theme files.

_________________
nukeSEO.com - PHPNuke SEO search engine optimization and other professional tools for PHP-Nuke 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Dec 01, 2007 10:42 am Reply with quote

Excellent feedback (and encouragement), as always, kguske!

No worries about Google. I see them as a "necessary evil" just like Microsoft. Unfortunately, it seems as you get bigger and bigger you get greedier and greedier AND you get more and more arrogant. I just don't like how they are treating their "customers" these days.

Yeah, on the NukeSentinel side, I don't relish the thought of having to support all the issues people will face by not merging their files (rather than overwriting) and I'll probably end up having to provide new files for every NukeSentinel release... Sad That is NOT what I want to be spending my time on. So, I am hoping Bob will support the simple new IF check.

BTW, newsletters being stored in the database rather than as files is definitely a 1.4 planned feature. Problem is, now that I have committed to PHP5 only by Feb 8th, it doesn't leave me much time to get 1.4 out!!!!! Sad

Off-Topic:
I just really feel strongly that I need to be helping to push hosts out of the stone-age (PHP4) even though I know that I may alienate a bunch of customers in the short-term...
 
View user's profile Send private message Visit poster's website
kguske
Community Giant



Joined: Dec 11, 2005
Posts: 32

PostPosted: Sat Dec 01, 2007 10:49 am Reply with quote

Understood.

Regarding opt outs, some might suggest that it isn't necessary since users sign up for newsletters. But having the flexibility default them to receiving newsletters (and not just one setting for the site regardless of how many newsletters you offer), is much better than forcing your users to sign up for each newsletter and find where to go in the site to opt out.

_________________
nukeSEO.com - PHPNuke SEO search engine optimization and other professional tools for PHP-Nuke 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Dec 01, 2007 11:10 am Reply with quote

Yeah, what I need to do is to sit down and map out all the functions that are common in various newsletter applications today and then start prioritizing the functionality.

My plan now is to re-write the HNL using PHP5 OO-based to take advantage of all that PHP5 classes offer. I am just so impressed with how Swift Mailer was done, that I am excited to move HNL in that direction.
 
View user's profile Send private message Visit poster's website
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 397

PostPosted: Sat Dec 01, 2007 12:21 pm Reply with quote

Auto opt out has one really good benefit in that should a user sign up with say a hotmail account and then through lack of use, that hotmail account goes into 'inactive' status, unless there is something to auto opt-out on a bounced mail, hotmail might interpret you sending mail to a none used account a spam - thoughts?
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©