EDIT: i'm testing it on a live Ubuntu 14 LTS Server
I'm working on a Laravel Project which needs to send emails. First I tried the native PHP on how to send email like:
<?php
// the message
$msg = "First line of text\nSecond line of text";
// use wordwrap() if lines are longer than 70 characters
$msg = wordwrap($msg,70);
// send email
mail("someone@example.com","My subject",$msg);
?>
But his thing doesn't work. Laravel is not giving me error either so what I did is use Laravel's default email configuration. I already configured the parameters in the mail.php
I'm using our company email settings provided by rackspace then I do this
$test = Mail::send('emails.message', ['user' => $user], function ($m) use ($user) {
$m->to('sample@email.com', $user->name)->subject('Custtomer Order Accepted !');
});
The sample@email.com
is just example in my code. I'm using a legit email for that. Then when I tried to var_dump
test I get int(0)
which I think a failed response? How do I use it correctly? Or even just the simple mail function is not working? I have the view already in emails.message