0
Hello,
I am trying to send emails using the Laravel 4.2 but the messages only arrive when the recipient’s email is the same as the one sent. The file configuration mail.php was like this:
<?php
return array(
'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 587,
'from' => array('address' => '[email protected]', 'name' => 'Teste com Emails'),
'encryption' => 'tls',
'username' => '[email protected]',
'password' => '1234567890',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,
);
The code used to send emails was like this:
\Mail::send('emails.hello', array('key' => 'value'), function($message)
{
$message->to('[email protected]', 'Leandro');
$message->from('[email protected]', 'Testes');
$message->subject('Welcome!');
});
A detail that may be important, I am working in a development environment, localhost, for the application.
Thank you in advance for your attention.
Have you checked if the
e-mail
is not going to the boxspam
or something like?– JcSaint
There is a a configuration in emails sent by gmail to release the restriction settings, have you ever done this??? I have it already implemented and send email to any destinating. Read the Link
– novic
@Jcsaint I checked, it’s not falling into the spam box. I will edit the question because I forgot to put a detail that may be important, I am working in a development environment.
– Leandro Paiva
@Virgilionovic really needed to unlock the Gmail, I made the proposed change and it worked, thank you very much.
– Leandro Paiva