Send Email With Exchange Web Services in Laravel

Packages

September 24th, 2021

laravel-mailbox-featured.jpg

Laravel Exchange Web Services Email is a package by Raju at LHG for sending Email via Microsoft Exchange Web Services (EWS) easily. The Laravel package is a wrapper around the PHP EWS composer package.

1use Raju\EWSMail\ExchangeMailServer;
2 
3ExchangeMailServer::sendEmail(
4 [
5 'name' => 'Raju at LHG',
6 'email' => 'raju@lhgraphics.com'
7 ],
8 [
9 'subject' => 'Mail From Package',
10 'body' => 'Message Body'
11 ]
12);

This is a small package, with one class responsible for sending emails via EWS—check out the ExchangeMailServer class for how this is built. I would also like to point out that this package requires the SOAP PHP extension to work, which is a dependency of the PHP EWS package.

To use this package, you'll need to configure your EWS host, username, password, and client version.

You can learn more about this package, get full installation instructions, and view the source code on GitHub.


This package was submitted to our Laravel News Links section. Links is a place the community can post packages and tutorials around the Laravel ecosystem. Follow along on Twitter @LaravelLinks

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.