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/

PHPMaster.com:
Creating a Mobile Photo Blog, Part 2
Oct 13, 2011 @ 15:54:21

PHPMaster.com has posted the second part of their series helping you build a mobile photo blog powered by email attachments pulled over POP3. (Part one is here)

This is the second article in a two part series in which I show you how to create a photo blog that is updated from your mobile device. Part 1 laid out the plan for building the application, set up the database requirements, and introduced you to some user contributed functions from the PHP manual which make it easy to retrieve messages from a POP3 mail server. In this installment I show you how to bring everything together so you can start photo-blogging on the go.

In this new tutorial they include the code to authenticate against the database, insert the email details into the tables and inserting the formatted results into blog posts. It's finished off with the code to pull out the latest entries and display them along with their matching photos.

tagged: tutorial photo blog pop3 email approval

Link:

WebReference.com:
Build Your Own PHP Web Mailer
Aug 11, 2010 @ 15:56:49

On WebReference.com today there's a new tutorial about creating a PHP interface for sending and receiving emails directly from a mailer script.

In this tutorial you will learn how to create your own PHP Web mailer. You will learn the necessary steps for creating an email account and making connections to the server protocols for sending and receiving email. You also will get a listing of PHP commands that you can use to customize the Web mailer to your specifications.

The script makes manual connections to the servers instead of using something like mail and sends the raw commands to send via an SMTP server and fetch over a POP3 connection. There's also an example of making an IMAP connection and sending commands to get the current list of messages, current status and fetch the messages.

tagged: web mailer tutorial imap stmp pop3

Link:

DeveloperTutorials.com:
Port Scanning and Service Status Checking in PHP
Apr 08, 2009 @ 13:49:21

On the DeveloperTutorials.com site today there's a new tutorial showing the creation of a port scanner with PHP - a tool that, given some of the familiar ports that services (like web or email servers) run on, can check to see if they're responding.

While building web applications, it's often important to keep an eye on the other services running on your server. Having access to the current status of public servers can empower your applications to make decisions and respond to problems automatically. Acknowledging a service is offline can also save endless support emails. In this tutorial, I'll show you how to keep track of your server status by scanning ports on your server with PHP.

Their example makes a socket connection to the remote port to see if there's a valid hookup. The wrap this inside a loop for ports 1 through 1000 to see what ports are open and responding on your local machine (doing this on a remote machine is just asking for trouble).

Their full example defines some of the common ports in an array and loops to check on their status. It sets out a base you can build on top of with things like their suggestions - logging scan results, repoting downtime and running a service-specific task.

tagged: port scan fsockopen socket http ftp pop3 check connection

Link:

Eran Galperin's Blog:
Handling mail and mime in PHP using the Zend Framework
Jul 18, 2008 @ 13:47:27

On the Techfounder blog (from Eran Galperin) there's a quick tutorial about using the Zend_Mail component of the Zend Framework to send both normal, plain-text emails and ones with MIME attachments.

Using PHP's built in function (aptly named mail() ) is relatively straightforward - until you need slightly more advanced features, such as adding and encoding email headers or sending multiple mails efficiently. Fortunately, the Zend Framework comes with a very capable mail component called Zend_Mail.

He shows how to send a simple email, do something a bit more complex with a custom SMTP server, read messages from a remote POP3 email box and how to attach a binary file/message.

tagged: zendframework email zendmail mime attachment pop3 read smtp custom

Link:

PHPClasses.org:
A PHP killer feature - Streams abstraction
Feb 01, 2008 @ 21:36:24

On the PHPClasses.org website there's a new entry covering, among other things, one handy feature PHP includes to let developers read and write their data more flexibly - streams.

This article explains what are stream handlers and how they simplify PHP developers lives by allowing PHP applications to easily read and write data from containers, like remote Web pages or e-mail messages, as if they were files. [...] The article also presents more examples of cool stream handlers classes submitted to the PHPClasses site by several authors.

He describes the abstraction that the streams interface allows, how they can make your life easier, a real-life example of streams in action (working with POP3) and some of the classes that have been contributed to PHPClasses.org that use them.

tagged: streams abstraction class example pop3 handler streams abstraction class example pop3 handler

Link:

PHPClasses.org:
A PHP killer feature - Streams abstraction
Feb 01, 2008 @ 21:36:24

On the PHPClasses.org website there's a new entry covering, among other things, one handy feature PHP includes to let developers read and write their data more flexibly - streams.

This article explains what are stream handlers and how they simplify PHP developers lives by allowing PHP applications to easily read and write data from containers, like remote Web pages or e-mail messages, as if they were files. [...] The article also presents more examples of cool stream handlers classes submitted to the PHPClasses site by several authors.

He describes the abstraction that the streams interface allows, how they can make your life easier, a real-life example of streams in action (working with POP3) and some of the classes that have been contributed to PHPClasses.org that use them.

tagged: streams abstraction class example pop3 handler streams abstraction class example pop3 handler

Link:

PHPit.net:
Read your e-mail with PHP!
Jul 14, 2006 @ 17:04:21

PHPit.net offers up yet another fine tutorial for your learning pleasure - this time with a focus on email, reading it that is in Read your e-mail with PHP (catchy, eh?).

E-mail is something we use every day, and almost everyone has their own e-mail address. To read our e-mail most of us tend to use something like Microsoft Outlook or Mozilla Thunderbird, but it's also possible to use PHP to read your e-mail. In this tutorial you will learn how.

I will take you through all the steps necessary to read your e-mail with PHP, and show you how to display all the newest e-mails in your inbox.

They use the POP3 class from PHPClasses.org to do most of the work, from connecting to thse server, logging in, grabing stats (like the number of emails), and grabbing and parsing out each email's data.

tagged: read email class pop3 connect login parse read email class pop3 connect login parse

Link:

PHPit.net:
Read your e-mail with PHP!
Jul 14, 2006 @ 17:04:21

PHPit.net offers up yet another fine tutorial for your learning pleasure - this time with a focus on email, reading it that is in Read your e-mail with PHP (catchy, eh?).

E-mail is something we use every day, and almost everyone has their own e-mail address. To read our e-mail most of us tend to use something like Microsoft Outlook or Mozilla Thunderbird, but it's also possible to use PHP to read your e-mail. In this tutorial you will learn how.

I will take you through all the steps necessary to read your e-mail with PHP, and show you how to display all the newest e-mails in your inbox.

They use the POP3 class from PHPClasses.org to do most of the work, from connecting to thse server, logging in, grabing stats (like the number of emails), and grabbing and parsing out each email's data.

tagged: read email class pop3 connect login parse read email class pop3 connect login parse

Link:


Trending Topics: