Support the ongoing development of Laravel.io →
Configuration Mail
Last updated 2 years ago.
0

Can you confirm that the path to sendmail exists on the Linux machine?

Does this path exist. /usr/sbin/sendmail

Last updated 2 years ago.
0

IanSirkit said:

Can you confirm that the path to sendmail exists on the Linux machine?

Does this path exist. /usr/sbin/sendmail

It does exist. I haven't done anything to configure sendmail, do I need to?

Last updated 2 years ago.
0

I have spend DAAAYS on this issue!!

First check to see if the live server actually has Sendmail on it as the previous post was hinting at. Make sure the path to it is correct for the live server.

Next, try turning app/config/app.php - debug = true - on the live server. Try to send the mail.

If you can, then it will be config related. In my case, I had Cartalyst Platform installed and it had its own mail config that was overriding the defaults in the config. A basic mistake that took me days to figure out!

Another thing to check is if you have environmental vars set up, it will probably be those settings somewhere.

If you are having the same issue I did, any packages you have installed that are mail related could be getting involved on the live server, but when you switch debug to true and it works, then its using the settings in your local config.

Hope that helps a little.

Last updated 2 years ago.
0

I just made sure sendmail is installed. This is my dev server so I am running in debug mode.

Do you know where I can find documentation about which environmental vars laravel is looking for?

Thanks for any help you can provide.

Last updated 2 years ago.
0

Cool. I'd just be 100% sure Laravel thinks you are in debug. I think in start.php or bootstrap.php (can't remeber which) there is an array where you can add your computer names and define which is local and live.

More info here: http://laravel.com/docs/4.2/configuration

I would urge you to take a look at app/config/local/app.php and also app/config/app.php and make sure debug is true in both cases. Then try sending a mail.

You can at least illuminate the mail settings the culprit.

Also, if you have app/config/mail.php and app/config/local/mail.php, check they have the correct set up. It's all basic stuff, but worth being 100%.

I chatted to Taylor (through Foge support) about this whilst I was debugging and he also suggested making sure that you haven't got pretend set to true in both mail.php files.

Taylor basically suggested that it was a config error somewhere.

Do you have any packages installed that might deal with Mail? They too need checking. This was my downfall as I found some configs in there that were priority when debug was false / live server.

One last place to check is app/storage/logs/laravel.log on the live/dev server when you have attempted to send a mail to see if you are getting any errors.

If you can rule these basic bits out, hopefully you'll be one step closer.

Hope it helps!

Last updated 2 years ago.
0

I verified I am in debug mode. I verified I have the right smtp server. I only have one mail.php file and pretend is set to true in it. I made a second under local and made sure pretend = false. I don't have any other packages which use mail. I am at a loss.

IanSirkit asked if the sendmail path existed. In the documentation I thought it said that path is only used if using the sendmail driver but I am using smtp.

This problem has me confused.

Last updated 2 years ago.
0

Turn pretend to false. Natural, if true, then Laravel will only pretend to send an email.

If that doesn't work... Sendmail can be a little better for testing as the message is sent via php. What os is on the Linux box? I think the next steps would be to try logging the mail. What happens if you change from SMTP to log and send a mail? This will log the email in app/storage/logs/laravel.log

If you are getting the message in there. Try sendmail.

In your terminal you can try:

sendmail -v

Which should give you the version of sendmail installed

And if installed: sendmail [email protected]

This will then ask for a message which should fire out.

If that works and you still want to use SMTP, my next guess would be that, as you aren't getting any errors, then Laravel is doing its job. You might want to check what ports are open on your SMTP server and the linix box. Something there could be blocking.

In fact, one of the first places I'd be tempted to look is in /var/log/mail on your linix box. See if you have any errors there.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

delahappy delahappy Joined 20 Jun 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.