We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Tutorial: Don't send emails to users based on their lastActivity!!! | Forum

Marcus
Marcus Jun 30 '20

Hi folks if u care about ur out-going emails quota then this tutorials is for u.


Why is it important not to send emails to those users who haven't been back online for some extended period of time like in my case 3 months.


Case in most cases that particular user won't come back ever again or the email is no longer valid so ur robbing ur legit users from getting notifications by trying to send emails to ghosts lol.


I will post another part of this code that will make users conform their email after they have been gone for some time.


Lets get started. Keep in mind this tutorial if only for those using SMTP!!!


Open this file: ow_system_plugins\base\bol\mail_service.php


Find: private function mailToDtoList( BASE_CLASS_Mail $mail )


Add this code after: $resultList = array();


// my fix 1/2 start        
$ow_language = OW::getLanguage();
if($mailState['subject'] != $ow_language->text('base', 'email_verify_subject') || $mailState['subject'] != $ow_language->text('base', 'reset_password_mail_template_subject'))
{
$userLastActivityTimeStamp = BOL_UserService::getInstance()->findByEmail( $mailState['recipientEmailList'][0])->activityStamp;
if($userLastActivityTimeStamp < strtotime('-90 days')) return $resultList;
}
// my fix 1/2 end


Now search for: public function addToQueue( BASE_CLASS_Mail $mail )


Add this code after: $dtoList = $this->mailToDtoList($mail);


// my fix 2/2 start
if(empty($dtoList)) return;
// my fix 2/2 end


OK ur all set to go.

The Forum post is edited by Marcus Jun 30 '20
dave Leader
dave Jul 1 '20
Topic was moved from General Questions.
priyaservice
priyaservice Jun 20 '22
Extremely intriguing data, worth suggesting. Delhi Escorts || Escort City ||  Escort goa  

Escort gurgaon || Escort jaipur ||

Hugh Brooks
Hugh Brooks Jul 26 '22
I found this post very interesting and informative. Thank you for sharing your special thoughts with us. I definitely share this with my peeps.
Allen Barton
Allen Barton Aug 1 '22
Super Mario is a series of platform games created by Nintendo starring their mascot, mario games
lawofe
lawofe Jan 2
I do not even know the way I stopped up right here, but I thought this publish used to be good. I do not recognize who you might be however certainly you’re going to a well-known blogger when you are not already Cheers! naga889
lawofe
lawofe Jan 2
Thanks for this post. I definitely agree with what you are saying. I have been talking about this subject a lot lately with my brother so hopefully this will get him to see my point of view. Fingers crossed! أهم مباريات اليوم
lawofe
lawofe Jan 3
I must test with you here. Which is not one thing I normally do! I enjoy studying a submit that will make people think. Also, thanks for allowing me to comment! dedekids opinie
tatitac
tatitac Jan 5
Heavy-duty drawer slides are suitable for industrial workstations and equipment storage. Drawer Slides Manufacturer
lawofe
lawofe Jan 7
I appreciate you taking the time to talk about them with people. https://roy-rosalyn.com/custom-socks/
lawofe
lawofe Jan 8
Heya! I just wanted to ask if you ever have any issues with hackers? My last blog (wordpress) was hacked and I ended up losing a few months of hard work due to no back up. Do you have any methods to protect against hackers? https://www.sdgicable.com/products-detail/SDGI-100G-QSFP28-Single-Lambda-Optical-Transceive.html
lawofe
lawofe Jan 8
I’m not that much of a internet reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your website to come back later. All the best PCB board manufacturer in Malaysia
lawofe
lawofe Jan 8
I’m not that much of a internet reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your website to come back later. All the best PCB board manufacturer in Malaysia
lawofe
lawofe Jan 9
Nice to be visiting your blog once more, it continues to be months for me. Nicely this post that i’ve been waited for so lengthy. I want this article to total my assignment in the university, and it has same topic together with your post. Thanks, terrific share. led vs hps
lawofe
lawofe Jan 9
A person essentially help to make seriously articles I would state. This is the first time I frequented your website page and thus far? I surprised with the research you made to make this particular publish incredible. Fantastic job! https://veymax.com/products/veymax-electric-skateboard-remote-control
lawofe
lawofe Jan 13
you might have a fantastic weblog here! would you wish to make some invite posts on my weblog? UFABETพนันบอลออนไลน์ฟรีถูกกฏหมาย
lawofe
lawofe Jan 13
How much of an exciting piece of writing, continue creating companion PhenQ
lawofe
lawofe Jan 13
How much of an exciting piece of writing, continue creating companion PhenQ
lawofe
lawofe Jan 14
There are incredibly plenty of details like that take into consideration. That is the fantastic specify raise up. I offer the thoughts above as general inspiration but clearly you can find questions such as the one you raise up where the most critical factor will probably be doing work in honest very good faith. I don?t know if guidelines have emerged about things like that, but More than likely that your particular job is clearly identified as a fair game. Both boys and girls notice the impact of a moment’s pleasure, for the rest of their lives. Tonic Greens
lawofe
lawofe Jan 14
Interesting post , I am going to spend more time learning about this subject ยูฟ่า191เข้าระบบ
Pages: 1 2 3 4 5 »