1
votes

:)

I have created the Contact Us form using laravel 4

when I set 'app/config/mail.php' file

to my gmail account , like this :

///
'driver' => 'smtp',
host' => 'smtp.gmail.com',
..
......
//

I can send message successfully

but the problem when , I set the 'app/config/mail.php' file to my own email settings with my host like this :

'driver' => 'smtp',
'host' => 'smtp1.servage.net',
'port' => 25,
'from' => array('address' => 'adress@mywebsite.com', 'name' => 'my_name'),
'encryption' => 'tsl',
'username' => 'my_login@mywebsite.com',
'password' => 'my_pass',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,

controller function :

Mail::send('emails.contactus', array('message'=>Input::get('message')), function($message) use ($dataContact){

            $message->from($dataContact['emailsender'] , $dataContact['username']);
            $message->to('adress@mywebsite.com', 'admin')->replyTo($dataContact['emailsender'] ,$dataContact['username'])->subject('contact request');
        });

I send without any error but when I check my inbox , I don't receive any message :(

What is the problem for this ? or is there another solution I can use it ? and thank you :)

2
Hi, I have the same problem. Were you able to find a solution? - Julien Poulin

2 Answers

0
votes

This may be a DNS / Email forwarding issue. Try checking your hosting provider which I assume is servage.net. Make sure your DNS settings are properly setup and pointing to the correct nameservers. Also, check to see if your host provider actually provides an email service or simply forwards emails. Once you have the right settings you'll probably have to wait anywhere from an hour to 48 hours to be sure they're set

0
votes

Your SMTP settings look wrong.

'encryption' => 'tsl',

should be

 'encryption' => 'tls',

and if you are using TLS then generally the port is 587, not 25.