Home php教程 php手册 joomla2.5 对一个组群发邮件

joomla2.5 对一个组群发邮件

Jun 06, 2016 pm 07:32 PM
content Bulk sending detailed mail

无详细内容 Joomla $app = JFactory::getApplication();$acl = JFactory::getACL();$db = JFactory::getDbo();$groupId = 10;$uIds = $acl-getUsersByGroup($groupId, false);$query = $db-getQuery(true);$query-select('email');$query-from('#__users');$q

Joomla
$app    = JFactory::getApplication();
$acl    = JFactory::getACL();
$db     = JFactory::getDbo();

$groupId = 10;

$uIds = $acl->getUsersByGroup($groupId, false);
$query = $db->getQuery(true);
$query->select('email');
$query->from('#__users');
$query->where('id IN (' . implode(',', $uIds) . ')');
$query->where("block = 0 AND sendEmail = 1");
$db->setQuery($query);
$rows = $db->loadColumn();

$mailer = JFactory::getMailer();
$mailer->setSender(array($app->getCfg('mailfrom'), $app->getCfg('fromname')));
$mailer->setSubject($subject);
$mailer->setBody($body);
$mailer->IsHTML(true);
$mailer->addRecipient($rows);
if (!$mailer->Send()) {
  JError::raiseWarning(500, JText::_('ERROR_SENDING_EMAIL'));
}
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Outlook emails lost from control panel in Windows 11 Outlook emails lost from control panel in Windows 11 Feb 29, 2024 pm 03:16 PM

Is the Outlook mail icon missing from Windows 11's Control Panel? This unexpected situation has caused confusion and concern among some individuals who rely on OutlookMail for their communication needs. Why don't my Outlook emails show up in Control Panel? There may be several possible reasons why there are no Outlook mail icons in Control Panel: Outlook is not installed correctly. Installing Office applications from the Microsoft Store does not add the Mail applet to Control Panel. The location of the mlcfg32.cpl file in Control Panel is missing. The path to the mlcfg32.cpl file in the registry is incorrect. The operating system is not currently configured to run this application

How to enable Sensitive Content Warning on iPhone and learn about its features How to enable Sensitive Content Warning on iPhone and learn about its features Sep 22, 2023 pm 12:41 PM

Especially over the past decade, mobile devices have become the primary way to share content with friends and family. The easy-to-access, easy-to-use interface and ability to capture images and videos in real time make it a great choice for creating and sharing content. However, it's easy for malicious users to abuse these tools to forward unwanted, sensitive content that may not be suitable for viewing and does not require your consent. To prevent this from happening, a new feature with "Sensitive Content Warning" was introduced in iOS17. Let's take a look at it and how to use it on your iPhone. What is the new Sensitive Content Warning and how does it work? As mentioned above, Sensitive Content Warning is a new privacy and security feature designed to help prevent users from viewing sensitive content, including iPhone

PHP sends emails asynchronously: avoid long waits for emails to be sent. PHP sends emails asynchronously: avoid long waits for emails to be sent. Sep 19, 2023 am 09:10 AM

PHP sends emails asynchronously: avoid long waits for emails to be sent. Introduction: In web development, sending emails is one of the common functions. However, since sending emails requires communication with the server, it often causes users to wait for a long time while waiting for the email to be sent. In order to solve this problem, we can use PHP to send emails asynchronously to optimize the user experience. This article will introduce how to implement PHP to send emails asynchronously through specific code examples and avoid long waits. 1. Understanding sending emails asynchronously

Word mail merge prints blank page Word mail merge prints blank page Feb 19, 2024 pm 04:51 PM

If you find that blank pages appear when printing a mail merge document using Word, this article will help you. Mail merge is a convenient feature that allows you to easily create personalized documents and send them to multiple recipients. In Microsoft Word, the mail merge feature is highly regarded because it helps users save time manually copying the same content for each recipient. In order to print the mail merge document, you can go to the Mailings tab. But some Word users have reported that when trying to print a mail merge document, the printer prints a blank page or doesn't print at all. This may be due to incorrect formatting or printer settings. Try checking the document and printer settings and make sure to preview the document before printing to ensure the content is correct. if

How to change the Microsoft Edge browser to open with 360 navigation - How to change the opening with 360 navigation How to change the Microsoft Edge browser to open with 360 navigation - How to change the opening with 360 navigation Mar 04, 2024 pm 01:50 PM

How to change the page that opens the Microsoft Edge browser to 360 navigation? It is actually very simple, so now I will share with you the method of changing the page that opens the Microsoft Edge browser to 360 navigation. Friends in need can take a look. I hope Can help everyone. Open the Microsoft Edge browser. We see a page like the one below. Click the three-dot icon in the upper right corner. Click "Settings." Click "On startup" in the left column of the settings page. Click on the three points shown in the picture in the right column (do not click "Open New Tab"), then click Edit and change the URL to "0" (or other meaningless numbers). Then click "Save". Next, select "

How to send a group message to everyone on WeChat - WeChat group message tutorial How to send a group message to everyone on WeChat - WeChat group message tutorial Mar 18, 2024 am 10:58 AM

Sending group messages to everyone on WeChat is a very convenient function that can help us deliver information quickly. If you need to send the same content to multiple friends (without creating a group), you can use the "Group Assistant" to send group messages to each friend. The editor below will introduce in detail how to send in bulk, let’s take a look! 1. Open WeChat and search for the [Group Send Assistant] function. 2. First enable the WeChat Mass Sending Assistant, and then click [Start Mass Sending] 3. Click [New Mass Sending] to enter the recipient selection page. 4. In the select recipients page, you can select all the contacts you want to send messages to by manually checking or selecting all. 5. After selecting the contact, click the "Next" button to enter the message editing interface. 6. In the message editing interface, you can

Step-by-step tutorial for sending group messages in WeChat Step-by-step tutorial for sending group messages in WeChat Mar 25, 2024 pm 07:11 PM

1. Click on the desktop to enter WeChat, click [Me] in the lower right corner, find and click [Settings]. 2. Find and click [General] in the [Settings] menu. 3. Find and open [Accessibility]. There is a [Group Assistant] in the accessibility function. Click to open it. 4. Then we will enter the page as shown below, click [Enable this function]-[Start mass sending]. 5. After clicking [New Group Send], you can select friends to send group messages to. After selecting the friends to whom you want to send group messages, click [Next] to proceed to the next step. 6. Finally, we edit the group sending content and click send.

PHP email tracking function: understand user behavior and feedback on emails. PHP email tracking function: understand user behavior and feedback on emails. Sep 19, 2023 am 08:51 AM

PHP email tracking function: understand user behavior and feedback on emails In modern society, email has become an indispensable part of people's daily life and work. For businesses, sending emails is one of the important ways to communicate with customers and promote products or services. However, after an email is sent, how do we know whether it was received, read, or how the user reacted to the content of the email? At this time, the email tracking function becomes particularly important. The email tracking function can help us understand user behavior and feedback on emails

See all articles