Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'smtp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 2 results

  1. hi, i tried to send an email through a php code as given in the book but following error occured Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\email.php on line 47 i tried to fix it by trying alot of things searching from internet but can't solve .
  2. I'm making a PHP newsletter sender, and I have multiple emails in a database. Is the following code the proper way to send multiple emails? So imagine that I have already done the MySQL call to retrieve all the emails, and I am now here: require_once "Mail.php"; require_once "Mail/mime.php"; $mail = new Mail_Mime(); $mime->setTXTBody('Text email'); $mime->setHTMLBody('HTML email'); $mime->setFrom('Sample Email Sender <sample@email.com>'); $mime->setSubject($subject); $body = $mime->get(); $headers = $mime->headers(); $smtp['host'] = 'smtp.emailserver.com'; $smtp['auth'] = true; $smtp['username'] = 'username@email.com'; $smtp['password'] = 'password'; $mail =& Mail::factory('smtp', $smtp); while($row = @mysqli_fetch_array($rq, MYSQLI_NUM)){$mail->send($row[0], $headers, $body);} unset($mime, $mail); You'll notice that what I did was set all the main email stuff outside of the while{} loop. Is this setup okay? Or do I need to move anything else into the while{} loop? Thanks again.
×
×
  • Create New...