No of visitors who read this post: 171
Category: PHP
Type: Question
Author: David Aames
No votes yet

I want to send email to groups using PHP. But I do not know how to do it. Please tell me the best way for sending email to groups using PHP. Its urgent please answer quick.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#

You can refer to following code:

$mail = new htmlMimeMail();
$mail->setHtml($html, $text);
$mail->setReturnPath('webmaster@domain.com');
$mail->setFrom('no-reply@domain.com');
$mail->setSubject($subject);
$mail->setHeader('X-Mailer', 'HTML Mime mail class (http://www.phpguru.org)');
 
$result = $mail->send(array($email_address), 'smtp');
 
if(!$result)
{
print_r($mail->errors);
}
else
{
echo 'Mail sent!<br />';
}

# (Solution Accepted)

If you are new to PHP programming and you are that eager to learn how to create program codes or scripts using PHP, then W3Schools will help you. PHP is a powerful tool for making interactive and dynamic web pages and it is the widely used, free, and efficient alternative to competitors such as the ASP of Microsoft.

W3Schools is the world’s largest web development site where you can learn different web programming tools that you can use on your website. Here are some of the PHP commands that you can learn:

PHP Basic

  • PHP Install
  • PHP Syntax
  • PHP Variables
  • PHP String
  • PHP Operators
  • PHP If...Else
  • PHP Switch
  • PHP Arrays
  • PHP While Loops
  • PHP For Loops
  • PHP Functions
  • PHP Forms
  • PHP $_GET
  • PHP $_POST

PHP Advanced

  • PHP Date
  • PHP Include
  • PHP File
  • PHP File Upload
  • PHP Cookies
  • PHP Sessions
  • PHP E-mail
  • PHP Secure E-mail
  • PHP Error
  • PHP Exception
  • PHP Filter

To learn more about PHP and to start your online tutorial, do visit w3schools.net – the world’s largest web development site - educate yourself! - beginners and experts | PHP Tutorial.

Regards
Sharath Reddy