Home arrow PHP arrow Using Different Paths for Attachments with Swift Mailer

Using Different Paths for Attachments with Swift Mailer

Welcome to the seventh tutorial of a series on Swift Mailer. Comprised of ten parts, this series introduces you gently to using this thorough PHP5-based email package. It complements the corresponding theory with numerous code samples that you can incorporate into your own PHP applications.

TABLE OF CONTENTS:
  1. Using Different Paths for Attachments with Swift Mailer
  2. Review: handling file attachments with Swift Mailer
  3. Attaching files from a different location with the fromPath() method
  4. Attaching files from a remote host
By: Alejandro Gervasio
Rating: starstarstarstarstar / 1
February 23, 2010

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

If you’re a PHP developer who’s looking for an approachable guide that teaches you how to take advantage of the most relevant features provided by the powerful Swift Mailer email library (available at http://swiftmailer.org), then this group of tutorials might be the material that you really need.  

Now that you’re aware of the goal of this article series, it’s time to review the topics that were discussed in the last tutorial. In that part of the series I explained how to attach one single file to a simple email message, and how to sent the message in HTML format.

In the first case, the sample file was attached by using a separate class included with Swift Mailer, called “Swift_Attachment,” while the formatting of the message with HTML was done via the “addPart()” method that belongs to the already familiar “Swift_Message" class.

However, the Swift Mailer library has plenty of options for handling files, including the ability to attach them from different locations on the web server and even from remote hosts. So, this seventh installment of the series will be focused on illustrating how to attach a file to an email message from a distinct folder, thus demonstrating the flexibility of the library when manipulating attachments’ paths.

Now, it’s time to leave the preliminaries behind and continue exploring the numerous features offered by Swift Mailer. Let’s jump in! 



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: