All Projects → JouwWeb → Slmmail

JouwWeb / Slmmail

Licence: other
Send mail from Laminas or Mezzio using external mail services.

Projects that are alternatives of or similar to Slmmail

go-mail
📧 A cross platform mail driver for GoLang. Featuring Mailgun, Postal, Postmark, SendGrid, SparkPost & SMTP.
Stars: ✭ 169 (+59.43%)
Mutual labels:  mail, mailgun, sendgrid
Laravel Mailbox
Catch incoming emails in your Laravel application
Stars: ✭ 783 (+638.68%)
Mutual labels:  mail, sendgrid, mailgun
SlmMail
Send mail from Laminas or Mezzio using external mail services.
Stars: ✭ 107 (+0.94%)
Mutual labels:  mail, mailgun, sendgrid
Mailcore
Emailing wrapper for Vapor 3 apps
Stars: ✭ 77 (-27.36%)
Mutual labels:  sendgrid, mailgun
Mailer
A light-weight, modular, message representation and mail delivery framework for Python.
Stars: ✭ 225 (+112.26%)
Mutual labels:  sendgrid, mailgun
MailHookBundle
A bundle to catch API webhook from different mail service
Stars: ✭ 36 (-66.04%)
Mutual labels:  mailgun, sendgrid
Mail
RiiConnect24 Mail Scripts. OSS.
Stars: ✭ 11 (-89.62%)
Mutual labels:  mail, sendgrid
wemail
Send Affordable Bulk Email Campaign Through WordPress
Stars: ✭ 19 (-82.08%)
Mutual labels:  mailgun, sendgrid
mailcoach-support
Questions and support for Mailcoach
Stars: ✭ 32 (-69.81%)
Mutual labels:  mailgun, sendgrid
Magento2 Gmail Smtp App
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers
Stars: ✭ 281 (+165.09%)
Mutual labels:  sendgrid, mailgun
bulk-mail-cli
Do quick, hassle-free email marketing with this small but very powerful tool! 🔥
Stars: ✭ 88 (-16.98%)
Mutual labels:  mail, mailgun
Airform
Functional HTML forms for Front-End Developers.
Stars: ✭ 307 (+189.62%)
Mutual labels:  sendgrid, mailgun
Django Anymail
Django email backends and webhooks for Amazon SES, Mailgun, Mailjet, Postmark, SendGrid, Sendinblue, SparkPost and more
Stars: ✭ 1,109 (+946.23%)
Mutual labels:  sendgrid, mailgun
Fluentemail
All in one email sender for .NET. Supports popular senders (SendGrid, MailGun, etc) and Razor templates.
Stars: ✭ 1,888 (+1681.13%)
Mutual labels:  sendgrid, mailgun
mailer
Simple Email Sending Client for Mailgun & Sendgrid services in crystal
Stars: ✭ 16 (-84.91%)
Mutual labels:  mailgun, sendgrid
Omnimail
Send email across all platforms using one interface
Stars: ✭ 325 (+206.6%)
Mutual labels:  sendgrid, mailgun
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (+585.85%)
Mutual labels:  sendgrid, mailgun
Ssh Shop
项目描述:建立购物小商城平台. 实现了前台页面系统。 技术描述:通过Spring 主框架来管理Struts2和Hibernate 框架搭建的电商小平台,用MySQL数据库并创建了表有用户表,订单表,商品表,商品分类表,商品内容表,购物车表等来存储数据。用到hibernate的懒加载方式来展示页面商品,商品分类,分类内容等信息。利用hibernate中session的方法实现分页显示商品。在网上下载的接口文档开发银行开放性接口,实现在线支付功能。用到html,css,js,ajax技术开发前端页面。后台实现利用Struts2的MVC模式对前端视图与后台数据交互,hibernate来处理dao层的业务逻辑的实现。
Stars: ✭ 78 (-26.42%)
Mutual labels:  mail
Mail4delphi
Mail4Delphi uses the Indy component to send the email.
Stars: ✭ 60 (-43.4%)
Mutual labels:  mail
React Share Button
📱 React share button component with web-share api and fallback modal with native intent urls
Stars: ✭ 89 (-16.04%)
Mutual labels:  mail

SlmMail

Build Status Latest Stable Version Scrutinizer Code Quality

SlmMail is a module that integrates with various third-parties API to send mails. Integration is provided with the API of those services. It does not handle SMTP.

Here are the currently supported services:

Requirements

Installation

  1. First install the repo:

    composer require slm/mail

    • For Laminas MVC add SlmMail in your application.config.php file.
    • For Mezzio it should prompt whether we want to autoconfigure. Accept this.
  2. In order to use a mail service, you now need to configure it. We have provided a sample configuration file per mail server.

    Copy the sample configuration file to your autoload directory. For example for Mandrill one would use

    cp vendor/slm/mail/config/slm_mail.mandrill.local.php.dist config/autoload/slm_mail.mandrill.local.php

    Please tweak the dummy contents in this file. This file will contain the credentials.

Usage

One can now fetch the dependencies from the service manager. And now compose a message:

$message = new \Laminas\Mail\Message();
$message
    ->setTo('[email protected]')
    ->setFrom('[email protected]')
    ->setSubject('Subject')
    ->setBody('Contents');

$mandrillService = $container->get(\SlmMail\Service\MandrillService::class);
$mandrillService->send($message);

Documentation

Documentation for SlmMail is splitted for each provider:

Cook-book

How to send an HTML email ?

Every email providers used in SlmMail allow to send HTML emails. However, by default, if you set the mail's content using the setBody content, this content will be considered as the plain text version as shown below:

$message = new \Laminas\Mail\Message();

// This will be considered as plain text message, even if the string is valid HTML code
$message->setBody('Hello world');

To send a HTML version, you must specify the body as a MimeMessage, and add the HTML version as a MIME part, as shown below:

$message = new \Laminas\Mail\Message();

$htmlPart = new \Laminas\Mime\Part('<html><body><h1>Hello world</h1></body></html>');
$htmlPart->type = "text/html";

$textPart = new \Laminas\Mime\Part('Hello world');
$textPart->type = "text/plain";

$body = new \Laminas\Mime\Message();
$body->setParts(array($textPart, $htmlPart));

$message->setBody($body);

For accessibility purposes, you should always provide both a text and HTML version of your mails.

How to configure HttpClient with http_options and http_adapter

By default the adapter is Laminas\Http\Client\Adapter\Socket but you can override it with other adapter like this in your slm_mail.*.local.php

'slm_mail' => array(
    // Here your email service provider options

    'http_adapter' => 'Laminas\Http\Client\Adapter\Proxy' // for example
)

If you want to change some options of your adapter please refer to you adapter class in var $config here and override these in your slm_mail.*.local.php like this :

'slm_mail' => array(
    // Here your email service provider options

    // example for Socket adapter
    'http_options' => array(
        'sslverifypeer' => false,
        'persistent' => true,
    ),
)

Which provider should I choose?

We won't answer you :-)! Each provider has their own set of features. You should carefully read each website to discover which one suits your needs best.

Who to thank?

Jurian Sluiman and Michaël Gallego did the initial work on creating this repo, and maintained it for a long time.

Currently it is maintained by:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].