News Feed
Sections




News Archive
feed this:

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

Rob Allen:
Sending attachments in multipart emails with ZendMail
September 16, 2014 @ 09:18:09

Rob Allen has a new post today showing you how to use the ZendMail component of the Zend Framework 2 to send attachments with multipart emails. A multipart email allows you to combine both the HTML and plain text versions of the content into a single email.

I've written before about how to send an HTML email with a text alternative in ZendMail, but recently needed to send an attachment with my multipart email. With help from various sources on the Internet, this is how to do it.

He includes the full code for the example first: a "sendEmail" function that sets up the MIME and plain-text parts and uses the "MimeMessage" and "MimePart" objects to attach the file. He goes through each of the parts of the script and describes what's happening and how that changes the content of the email. You can find out more about the ZendMail component in this section on the Zend Framework manual.

0 comments voice your opinion now!
tutorial send email attachment multipart zendframework2 zendmail

Link: http://akrabat.com/zend-framework-2/sending-attachments-in-multipart-emails-with-zendmail/

PHPMaster.com:
Sending Emails with PHP
October 24, 2011 @ 20:08:52

In a new tutorial from PHPMaster.com Jason Pasnikowski takes a look at sending emails with PHP - an introduction to what the language offers and how it can be used to send an HTML version.

In most cases your installation of PHP will be capable of sending emails. If you are using a shared host, or if you installed PHP using a package management system like apt-get, more than likely you're all set. You'll really only need to worry about extra configuration if you're compiling PHP from source or if you're running it on Windows. In either case, there are plenty of resources available online to help you out. Because that's all beyond the scope of this article, I'll assume you're set. If not, Google will be your friend.

He starts with a simple example using the mail function but quickly moves on to sending a multi-part email with an attached zip file and HTML content. He includes the all code you'll need and explains each part in detail so you'll know exactly what's going on.

0 comments voice your opinion now!
send email tutorial html multipart zip file


Ian Christian's Blog:
Sending multipart email from a Task in symfony 1.4
December 16, 2009 @ 07:58:37

In a recent post to his blog Ian Christian has written up an example of how to send a multipart email from a Task inside your Symfony application.

I recently needed to send the result of an action in symfony via email daily. E-mail has changed slightly in symfony 1.3/1.4 - here's how I did it. I really don't like my solution at all, the use of get_partial() from within a Task seems very wrong to me - but I'm in a rush so it will do for now, I'd love to hear feedback.

His class extends the sfBaseTask and sets up an execute method that builds a database connection, fetches a few rows and, with a newly created mailer instance, sends the information using the get_partial method to define both HTML and text content parts of the email.

0 comments voice your opinion now!
multipart email task symfony tutorial


Terry Chay's Blog:
Clever HTTP
February 15, 2007 @ 08:19:00

With the recent release of a new Firefox/PHP combination extension, several developers were interested in just how it all worked. One such developer is Terry Chay who has posted about it to his blog today after looking into how it all fits together.

The standard way of debugging in PHP involves just echoing shit to the screen. The fact that PHP is a scripting language makes this an excellent way of debugging on the web. But what happens when doing this breaks your site?

That's where FirePHP comes in - it sends along a special request from your PHP script (as fired off by special code you insert) to include debugging information inside a different part of a "multipart/mixed" message. Terry also includes some of his sample code (including a custom version of the software) that he used to get things working. Check out the screenshot for the results.

0 comments voice your opinion now!
http firephp firefox extension example screenshot multipart message http firephp firefox extension example screenshot multipart message



Community Events





Don't see your event here?
Let us know!


laravel introduction deployment language zendserver list threedevsandamaybe symfony podcast conference series interview tips bugfix release voicesoftheelephpant community framework code api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework