Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Matt Stauffer:
Introducing Mailables in Laravel 5.3
Aug 05, 2016 @ 15:57:32

Matt Stauffer has posted the next in his "what's coming in Laravel 5.3" series today with this look at "mailables" to help make sending mail simpler in Laravel-based applications.

For the longest time, sending mail in Laravel has felt clumsy compared to the relatively light APIs of most other Laravel features. I'm not saying it's awful—it's still so much cleaner than its competitors--but it's often confusing to figure out what goes in the closure and what doesn't, what the parameter order is, etc.

Mailables are PHP classes in Laravel 5.3 that represent a single email: "NewUserWelcome", or "PaymentReceipt". Now, similar to event and job dispatching, there's a simple "send" syntax, to which you'll pass an instance of the class that represents what you're "dispatching"; in this context, it's an email.

He gives an example of the updated syntax for calling these "mailables", how to create them with the artisan command and their structure/usage. He also shows how to pass data into the object and some other included features (like customizing the delivery list, queuing and working with attachments).

tagged: mail sending laravel mailable class interface overview

Link: https://mattstauffer.co/blog/introducing-mailables-in-laravel-5-3

Danne Lundqvist's Blog:
Problem sending mail with PHP mail function
Apr 17, 2007 @ 13:24:00

In a new post on the Dotvoid.com blog today, Danne Lundqvist talks about some of the issues he's had with the mail function in PHP. Specifically, it's about the mails being set but not making it to their destinations.

Instead I have used a PHP class that allows me to send emails using a remote smtp server using an account on that server. This has been a good solution for my setup anyways. A few days ago a friend of mine was asked to investigate the very same problem for a client.

As it turns out, the solution to their problem was pretty simple - a conflict between the sendmail_from in the php.ini and the "From" passed into the mail function call. A simple ini_set resolved the issue and kept the spam filters from catching and blocking the message.

tagged: mail function sending spam from sendmailfrom phpini mail function sending spam from sendmailfrom phpini

Link:

Danne Lundqvist's Blog:
Problem sending mail with PHP mail function
Apr 17, 2007 @ 13:24:00

In a new post on the Dotvoid.com blog today, Danne Lundqvist talks about some of the issues he's had with the mail function in PHP. Specifically, it's about the mails being set but not making it to their destinations.

Instead I have used a PHP class that allows me to send emails using a remote smtp server using an account on that server. This has been a good solution for my setup anyways. A few days ago a friend of mine was asked to investigate the very same problem for a client.

As it turns out, the solution to their problem was pretty simple - a conflict between the sendmail_from in the php.ini and the "From" passed into the mail function call. A simple ini_set resolved the issue and kept the spam filters from catching and blocking the message.

tagged: mail function sending spam from sendmailfrom phpini mail function sending spam from sendmailfrom phpini

Link:

WebCheatSheet.com:
Two New Tutorials - Database Export & Sending Email
Feb 09, 2007 @ 18:36:00

WebCheatSheet.com has two new tutorials posted today - one dealing with the export of a database schema in an XML format and the other about sending emails from PHP.

Here's a link to the first article.

Sometimes it can be useful to have a dump of the current database schema. This script reads the schema from a MySQL database and outputs XML that describes the schema.

And a link to article number two.

So, you want to send automated email messages from your PHP application. This can be in direct response to a user's action, such as signing up for your site, or a recurring event at a set time, such as a monthly newsletter. Sometimes email contains file attachments, both plain text and HTML portions, and so on. To understand how to send each variation that may exist on an email, we will start with the simple example and move to the more complicated.
tagged: database export xml schema sending email text html attachment database export xml schema sending email text html attachment

Link:

WebCheatSheet.com:
Two New Tutorials - Database Export & Sending Email
Feb 09, 2007 @ 18:36:00

WebCheatSheet.com has two new tutorials posted today - one dealing with the export of a database schema in an XML format and the other about sending emails from PHP.

Here's a link to the first article.

Sometimes it can be useful to have a dump of the current database schema. This script reads the schema from a MySQL database and outputs XML that describes the schema.

And a link to article number two.

So, you want to send automated email messages from your PHP application. This can be in direct response to a user's action, such as signing up for your site, or a recurring event at a set time, such as a monthly newsletter. Sometimes email contains file attachments, both plain text and HTML portions, and so on. To understand how to send each variation that may exist on an email, we will start with the simple example and move to the more complicated.
tagged: database export xml schema sending email text html attachment database export xml schema sending email text html attachment

Link:

DevArticles:
Sending Email with AJAX - Interacting with the Server
Jan 31, 2006 @ 18:09:58

DevArticles has posted the last part in their "Sending Email with Ajax" series today - an explaination of the last piece of the puzzle, server-side interaction.

Welcome to the last tutorial of the series "Sending email with AJAX." As you may have guessed regarding the title, this three-part series explains the development of a fairly simple AJAX-driven email client application, which offers some interesting capabilities for sending email, as well as for displaying and adding contacts, all without the need to involve page reloads.

They start off with a quick recap of the previous parts, and move quickly on to the script you'll need to accept the Ajax messages from the client (in this case, PHP). They show you how to have it add a contact to an XML file and send off the message to the server to be handled through PHP's mail() function...

tagged: ajax email sending server interaction ajax email sending server interaction

Link:

DevArticles:
Sending Email with AJAX - Interacting with the Server
Jan 31, 2006 @ 18:09:58

DevArticles has posted the last part in their "Sending Email with Ajax" series today - an explaination of the last piece of the puzzle, server-side interaction.

Welcome to the last tutorial of the series "Sending email with AJAX." As you may have guessed regarding the title, this three-part series explains the development of a fairly simple AJAX-driven email client application, which offers some interesting capabilities for sending email, as well as for displaying and adding contacts, all without the need to involve page reloads.

They start off with a quick recap of the previous parts, and move quickly on to the script you'll need to accept the Ajax messages from the client (in this case, PHP). They show you how to have it add a contact to an XML file and send off the message to the server to be handled through PHP's mail() function...

tagged: ajax email sending server interaction ajax email sending server interaction

Link:


Trending Topics: