Support the ongoing development of Laravel.io →
Installation Mail Packages
Last updated 1 year ago.
0

Does anything show up in Mandrill or Laravel's logs?

Last updated 1 year ago.
0

Check if you have mail.pretend set to true.

Last updated 1 year ago.
0

Can you just use mandrill's smtp? Thats what I always do. Here is my mail config:

<?php

return array(

	/*
	|--------------------------------------------------------------------------
	| Mail Driver
	|--------------------------------------------------------------------------
	|
	| Laravel supports both SMTP and PHP's "mail" function as drivers for the
	| sending of e-mail. You may specify which one you're using throughout
	| your application here. By default, Laravel is setup for SMTP mail.
	|
	| Supported: "smtp", "mail", "sendmail"
	|
	*/

	'driver' => 'smtp',

	/*
	|--------------------------------------------------------------------------
	| SMTP Host Address
	|--------------------------------------------------------------------------
	|
	| Here you may provide the host address of the SMTP server used by your
	| applications. A default option is provided that is compatible with
	| the Postmark mail service, which will provide reliable delivery.
	|
	*/

	'host' => 'smtp.mandrillapp.com',

	/*
	|--------------------------------------------------------------------------
	| SMTP Host Port
	|--------------------------------------------------------------------------
	|
	| This is the SMTP port used by your application to delivery e-mails to
	| users of your application. Like the host we have set this value to
	| stay compatible with the Postmark e-mail application by default.
	|
	*/

	'port' => 587,

	/*
	|--------------------------------------------------------------------------
	| Global "From" Address
	|--------------------------------------------------------------------------
	|
	| You may wish for all e-mails sent by your application to be sent from
	| the same address. Here, you may specify a name and address that is
	| used globally for all e-mails that are sent by your application.
	|
	*/

	'from' => array('address' => '[email protected]', 'name' => null),

	/*
	|--------------------------------------------------------------------------
	| E-Mail Encryption Protocol
	|--------------------------------------------------------------------------
	|
	| Here you may specify the encryption protocol that should be used when
	| the application send e-mail messages. A sensible default using the
	| transport layer security protocol should provide great security.
	|
	*/

	'encryption' => 'tls',

	/*
	|--------------------------------------------------------------------------
	| SMTP Server Username
	|--------------------------------------------------------------------------
	|
	| If your SMTP server requires a username for authentication, you should
	| set it here. This will get used to authenticate with your server on
	| connection. You may also set the "password" value below this one.
	|
	*/

	'username' => '[email protected]',

	/*
	|--------------------------------------------------------------------------
	| SMTP Server Password
	|--------------------------------------------------------------------------
	|
	| Here you may set the password required by your SMTP server to send out
	| messages from your application. This will be given to the server on
	| connection so that the application will be able to send messages.
	|
	*/

	'password' => 'SD9F87ASDF987FD9SA7DF',

	/*
	|--------------------------------------------------------------------------
	| Sendmail System Path
	|--------------------------------------------------------------------------
	|
	| When using the "sendmail" driver to send e-mails, we will need to know
	| the path to where Sendmail lives on this server. A default path has
	| been provided here, which will work well on most of your systems.
	|
	*/

	'sendmail' => '/usr/sbin/sendmail -bs',

	/*
	|--------------------------------------------------------------------------
	| Mail "Pretend"
	|--------------------------------------------------------------------------
	|
	| When this option is enabled, e-mail will not actually be sent over the
	| web and will instead be written to your application's logs files so
	| you may inspect the message. This is great for local development.
	|
	*/

	'pretend' => false,

);
Last updated 1 year ago.
0

@that0n3guy Thanks it works fine :)

Last updated 1 year ago.
0

I ran into this and found that I needed to include a "from" address. Mandrill's SMTP server returns an error when you omit the from address, but for some reason the API doesn't complain.

This did not work:

Mail::send('emails.welcome', $data, function($message)
{
    $message->to('[email protected]', 'John Smith')
        ->subject('Welcome!');
});

This did work:

Mail::send('emails.welcome', $data, function($message)
{
    $message->to('[email protected]', 'John Smith')
        ->from('[email protected]')
        ->subject('Welcome!');
});
Last updated 1 year ago.
0

thanks its work.. but in laravel 5.x you must change from 'driver' => 'smtp', to 'driver' => 'mandrill'..

0

Oh my god. I'm so fucking pissed off at Mandrill right now. I just found out about this. No one complained about email not working so I didn't know it was broken. But sure enough, if I don't include the "from", email doesn't arrive. Just thinking about how much email has been lost now...

Last updated 8 years ago.
0

mandrill is not working My composer.json "php": ">=5.5.9", "laravel/framework": "5.1.*", "illuminate/html": "^5.0", "laracasts/flash": "^1.3", "swiftmailer/swiftmailer": "^5.4", "guzzlehttp/guzzle": "~4.0" in App\config\services.php 'mandrill' => [ 'secret' => env('my secret key'), ],

I am using the following route for test Route::get('sendemail', function () {

$data = array(
    'name' => "Learning Laravel",
);

Mail::send('emails.welcome', $data, function ($message) {

	$message->to('[email protected]', 'John Smith')
		->from('[email protected]')
		->subject('Welcome!');

});

return "Your email has been sent successfully";

});

0

@mubeshier I just had this issue and figured things out.

If you take a look at config/services.php, there is a this

    'mandrill' => [
        'secret' => env('MANDRILL_SECRET'),
    ],

it should be:

'secret' => env('MAIL_PASSWORD'),
Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

whisher whisher Joined 9 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.