Download the PHP package lekoala/silverstripe-foundation-emails without Composer

On this page you can find all versions of the php package lekoala/silverstripe-foundation-emails. 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 silverstripe-foundation-emails

SilverStripe Foundation Emails module

Replace the default html template by one made with [Foundation Emails] (http://foundation.zurb.com/emails/docs/css-guide.html).

The email templates use zurb/foundation-emails to provide a consistent markup.

Expanded generic emails

The generic email comes with a few new options:

A default Header and Footer is provided:

In the footer, social medias links should be provided through the EmailFooterLinks method on the SiteConfig. Each item consist of a : Class, Link, Label and Icon.

NOTE: do not use setBody because it will prevent the usage of the default template. Instead, rely on addData(['EmailContent' => $body]).

Template helpers

Instead of relying on specific markup, you can also use template helpers directly in your email templates. For instance:

Available helpers are:

Make it your own styles

The templates are divided in various include which allow you to easily make them fit your styles.

To define your base styles, override FoundationEmailStyles.ss.

To define your own headers and footers, override FoundationEmailFooter and FoundationEmailHeader.

Two other styles are provided : "vision" and "ceej". Feel free to use the one you like the most. You can select your theme by applying the following config.

You can also edit basic color or use extension point "updateFoundationColors".

Consistent ChangePassword and ForgotPassword templates

These default templates have been overriden.

NOTE : we include a button to reset the password instead of a plain link.

Create new emails

As explained in the [SilverStripe documentation] (https://docs.silverstripe.org/en/4/developer_guides/email/) you can create subclasses of the Email class.

An example class has been provided called WelcomeEmail.

Testing emails

For your convenience, a task called "Email Viewer Task" has been provided.

This task allow you to select any subclass of the Email class and see its html (preview and code).

You can also set the locale and inline styles (require pelago/emogrifier) for better testing.

If your emails require constructor arguments that are DataObjects, random records from your database will be injected. If you want to inject specific records, pass ClassNameID=YourID as GET parameters (for instance MemberID=5).

Compatibility

Tested with 4.1+

Maintainer

LeKoala - [email protected]


All versions of silverstripe-foundation-emails with dependencies

PHP Build Version
Package Version
Requires php Version ~7
silverstripe/framework Version ^4
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 lekoala/silverstripe-foundation-emails contains the following files

Loading the files please wait ....