Download the PHP package ikkez/f3-mailer without Composer

On this page you can find all versions of the php package ikkez/f3-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package f3-mailer

Sugar Mailer

This is a little mail plugin that contains:

Getting started

This plugin is configurable via config file:

Usage

A little sample looks like this:

If you want, you can change the encoding type that is used for the email body and header when instantiating the mail object with a constructor argument:

Tracking

To initialize the tracking routes, call this before $f3->run():

To add the ping tracking pixel (1x1 transparent 8bit PNG), put this in your html mail body:

The file name should be a unique hash you can use to identify the recipient who read your mail.

The tracking methods could look like this:

Mock & Storage

In case you don't want to actually send the email, but just want to run a test flight and save the mail in a text file, you can mock the server dialog:

If you want to keep using the object after a mock call, you need to reset the mailer and add recipients, content and attachments again.

The mail file includes all file attachments.

Logging

You can log the full SMTP server dialog after sending the email. This could be useful for debugging purposes or as a sending confirmation.

Notice: By default, the log level is verbose, which means it also contains the mail body and attachments, which might eat up a lot of memory. To reduce the log level, set $log to TRUE (dialog only) or FALSE (disabled) in:

Keep in mind that when you write down mails to files, it can only store what was found in the SMTP log, hence it only works when logging level is verbose.

Demo & Testing

There's a test bench available here: https://github.com/ikkez/f3-mailer/tree/test

API

addBcc

Adds a blind carbon copy recipient.

addBcc($email, $title=null)

addCc

Adds a carbon copy recipient.

addCc($email, $title=null)

addTo

Adds a direct recipient. addTo($email, $title=null)

attachFile

Adds a file attachment.

attachFile($path, $alias=null, $cid=null)

initSMTP

Initializes SMTP plugin. Useful if you want to reuse the Mailer object but with a fresh SMTP adapter beneath. It's possible to change options before, i.e. to use a different smtp server.

initTracking

This registers the required routes to F3

log

Returns SMTP log

reset

Reset recipients if key was given, or restart whole smtp plugin.

($key=null)

save

Save the send mail to disk

save($filename)

send

Send message

send($subject [, $mock = false [, $log = 'verbose']])

log level options: FALSE, TRUE, 'verbose'

set

Set encoded header value

set($key, $val)

setContent

Set message contents by mime type

setContent($data [, $mime [, $charset=NULL ]])

I.e. for AMP mails:

$mailer->setContent($amp,'text/x-amp-html');

setErrors

Set receipient for bounce error mails

setErrors($email [, $title=null])

setFrom

Set message sender

setFrom($email [, $title=null])

setHTML

set message in HTML text format

setHTML($message)

setReply

set reply-to field respected by most email clients

setReply($email [, $title=null])

setText

set message in plain text format

setText($message)

License

You are allowed to use this plugin under the terms of the GNU General Public License version 3 or later.

Copyright (C) 2022 Christian Knuth [ikkez]


All versions of f3-mailer with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ikkez/f3-mailer contains the following files

Loading the files please wait ....