Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Sending Emails in PHP with PHPMailer
Apr 27, 2015 @ 17:53:56

The SitePoint PHP blog has a tutorial from Narayan Prusty showing you how to effectively use PHPMailer to send emails from your PHP application. PHPMailer provides a simplified interface to send both simple and complex emails.

PHPMailer is one of the most popular open source PHP libraries to send emails with. It was first released way back in 2001 and since then it has become a PHP developer’s favorite way of sending emails programmatically, aside from a few other fan favorites like Swiftmailer. In this article we’ll talk about why you should use PHPMailer instead of PHP’s mail() function and we’ll show some code samples on how to use this library.

He starts by answering the obvious question - is it an alternative to PHP's own mail function? He describes the differences, mostly in the way of enhanced functionality PHPMailer offers. He then helps you get it installed via Composer and how to send a first simple email. Next up he shows how to send an email with attachments and connecting the library to an external SMTP server for sending. The tutorial finishes with a quick mention of using POP3 to read emails and how to show local error messages when something goes wrong.

tagged: tutorial send email phpmailer library simple attachment smtp pop3 error

Link: http://www.sitepoint.com/sending-emails-php-phpmailer/

NetTuts.com:
How to Send Text Messages with PHP
Jan 25, 2011 @ 16:14:39

On NetTuts.com today there's a new tutorial showing you how to send text messages via SMS directly from your script to the user's cell phone.

Text messaging has become extremely widespread throughout the world — to the point where an increasing number of web applications have integrated SMS to notify users of events, sales or coupons directly through their mobile devices. In this tutorial, we will cover the fundamentals of sending text messages with PHP.

Their method "cheats" a little bit and uses an interface many of the cell phone providers offer to their subscribers - a link from an email address to SMS. Most providers have their domains you can send the email to and have it automatically forwarded to the user's cell as a text. Thankfully, this requires nothing more than the mail function to accomplish. They include the sample code and HTML+CSS to make a basic form as well as mention PHPMailer as a more powerful mailing alternative.

tagged: text message tutorial send phpmailer mail

Link:

Web Development Blog:
PHP Mail Scripts using SMTP transport, a guide for beginners
Apr 12, 2010 @ 15:47:47

From the Web Development Blog today there's a new tutorial showing you how to use STMP from PHP via one of three different tools - the Zend_Mail component of the Zend Framework, SwiftMailer and PHPMailer.

PHP has a very simple mail function which is used very often for basic text mail messages. What if you need to attach files or if you need to send your e-mail messages via SMTP? Than it’s time to use a more advanced script. This is because the standard mail function has only limited standard capabilities.

Snippets of code are included for each of the three showing how to send a simple email with the usual "To", "From" and body contents. All of the tools have the ability to include attachments, but that's not included here.

tagged: smtp tutorial beginner swiftmailer zendmail phpmailer

Link:

Web Development Blog:
Sending e-mails via SMTP with PHPmailer and Gmail
Sep 04, 2009 @ 19:56:14

On the Web Development Blog there's a recent post about using the PHPMailer package to send email out via the Google Mail servers.

These days I tried some plugin to send mail message within bbpress via SMTP. Since my domains email is hosted with Google applications I decided to send my messages via the SMTP server from Gmail. I found several articles and tutorials, but a lot of them didn’t work for me. [...] You need for this code example a PHP5 enabled web host (I tested only on Linux), the port 465 need to be open and of course you need a Gmail or Google applications account.

Complete code is provided - a smtpmailer function that takes in the standard mail parameters (to, from, subject, msg) and ships the message off to the Gmail STMP servers (on their custom port 465).

tagged: email tutorial gmail phpmailer stmp

Link:

Symfony Blog:
symfony 1.0.5 released (security fix)
Jun 28, 2007 @ 15:31:00

The Symfony project has released the latest version of their framework - Symfony 1.0.5 - largely a security fix release to help head off some issues that came up with the phpmailer utility.

I've just released symfony 1.0.5. If you use the symfony built-in phpmailer (and you do if you use the ->sendMail() method in your actions), you must upgrade to this release or apply the following patch: http://trac.symfony-project.com/trac/changeset/4380?format=diff&new=4380. PHPMailer has a remote command execution vulnerability if you have configured it to use sendmail. You can find more information about this issue here: http://larholm.com/2007/06/11/phpmailer-0day-remote-execution/

The easiest way to correct the issue is to just apply the patch to your current installation, but since there are other fixes included in the new version, you might opt for the update anyway.

tagged: symfony framework release security phpmailer vulnerability symfony framework release security phpmailer vulnerability

Link:

Symfony Blog:
symfony 1.0.5 released (security fix)
Jun 28, 2007 @ 15:31:00

The Symfony project has released the latest version of their framework - Symfony 1.0.5 - largely a security fix release to help head off some issues that came up with the phpmailer utility.

I've just released symfony 1.0.5. If you use the symfony built-in phpmailer (and you do if you use the ->sendMail() method in your actions), you must upgrade to this release or apply the following patch: http://trac.symfony-project.com/trac/changeset/4380?format=diff&new=4380. PHPMailer has a remote command execution vulnerability if you have configured it to use sendmail. You can find more information about this issue here: http://larholm.com/2007/06/11/phpmailer-0day-remote-execution/

The easiest way to correct the issue is to just apply the patch to your current installation, but since there are other fixes included in the new version, you might opt for the update anyway.

tagged: symfony framework release security phpmailer vulnerability symfony framework release security phpmailer vulnerability

Link:

Devshed:
PHP Email
Oct 25, 2006 @ 16:18:00

In the never-ending stream of article series that comes out of DevShed, they've started up a new one today with part one of a look at creating an email client with PHP and implementing the full email functionality (reading/writing/attachments/etc).

In this four-part series of articles we are going to build an email client with PHP. I will try to implement a full email client with all the functionality that you would expect from an email client, which includes a trash folder, sent items folder and a draft folder. But that's not all.

In part one, they set things up - talking about how it will all work (using the PHPMailer class) and the creating of the database tables to store the data for the app including the messages and the user information.

tagged: email phpmailer feature send recieve database tutorial client email phpmailer feature send recieve database tutorial client

Link:

Devshed:
PHP Email
Oct 25, 2006 @ 16:18:00

In the never-ending stream of article series that comes out of DevShed, they've started up a new one today with part one of a look at creating an email client with PHP and implementing the full email functionality (reading/writing/attachments/etc).

In this four-part series of articles we are going to build an email client with PHP. I will try to implement a full email client with all the functionality that you would expect from an email client, which includes a trash folder, sent items folder and a draft folder. But that's not all.

In part one, they set things up - talking about how it will all work (using the PHPMailer class) and the creating of the database tables to store the data for the app including the messages and the user information.

tagged: email phpmailer feature send recieve database tutorial client email phpmailer feature send recieve database tutorial client

Link:

MC|Press Online:
TechTip: PHP Delivers mail() on IBM System i
Oct 10, 2006 @ 15:36:00

As linked to by the Zend Developer Zone today, the MC|Press online site has a new article about the latest feature IBM has added to the PHP distributions on their System i servers - the mail() function.

PHP, the popular Web development language, has long provided a built-in function, mail(), to send email messages. Until recently, this function was available only on non-System i platforms. The limitation applied both to home-grown System i PHP versions and to beta releases of Zend Core for i5/OS (the PHP distribution by IBM and Zend).

Users of PHP on System i can now rejoice. The GA release of Zend Core for i5/OS, introduced in August 2006, implements mail().

They cover all aspects of why this is definitely a good thing. Developers tend to take this handy function for granted until they really need to interact with the outside world via emails. They take a brief look at what the mail function is, including how it's used, configuration settings for it, and some of the other alternatives that are offered (with advantages and disadvantages of choosing them).

tagged: mail techtip systemi ibm server phpmailer example configure mail techtip systemi ibm server phpmailer example configure

Link:

MC|Press Online:
TechTip: PHP Delivers mail() on IBM System i
Oct 10, 2006 @ 15:36:00

As linked to by the Zend Developer Zone today, the MC|Press online site has a new article about the latest feature IBM has added to the PHP distributions on their System i servers - the mail() function.

PHP, the popular Web development language, has long provided a built-in function, mail(), to send email messages. Until recently, this function was available only on non-System i platforms. The limitation applied both to home-grown System i PHP versions and to beta releases of Zend Core for i5/OS (the PHP distribution by IBM and Zend).

Users of PHP on System i can now rejoice. The GA release of Zend Core for i5/OS, introduced in August 2006, implements mail().

They cover all aspects of why this is definitely a good thing. Developers tend to take this handy function for granted until they really need to interact with the outside world via emails. They take a brief look at what the mail function is, including how it's used, configuration settings for it, and some of the other alternatives that are offered (with advantages and disadvantages of choosing them).

tagged: mail techtip systemi ibm server phpmailer example configure mail techtip systemi ibm server phpmailer example configure

Link:


Trending Topics: