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

For GoDaddy, you want your driver to be

'sendmail'

and the path to be

'/usr/lib/sendmail -t'

That worked for me.

Last updated 2 years ago.
0

I would recommend using a service such as Mandrill or Mailgun http://mandrill.com http://www.mailgun.com

There are drivers built in for both in Laravel 4.2+ so integration should be easy.

You'll get other benefits such as logging all emails and tracking opens and bounce rates.

Last updated 2 years ago.
0

Clox said:

Hello! I'm trying to set up my laravel powered web application to use the smtp server of godaddy. These are my settings of app/config/mail.php:

Also, I tried using gmail as smtp server instead and that did work..

Any idea what could be causing this?

Thanks in advance!

Clox,

I was wondering if you (or anybody else) could share the settings you use to get a shared GoDaddy server to allow smtp with Google? I was able to successfully use smtp with DigitalOcean, but have recently moved to a shared hosting on GoDaddy and I keep getting this error message:

Swift_TransportException 
Connection could not be established with host smtp.gmail.com [Connection refused #111]

I was able to get it to work using "sendmail" with the instructions above, but it takes 15 minutes for the email to arrive for some reason, while using smtp was almost instant on DigitalOcean.

Here are my current settings for trying to use smtp:

'driver' => 'smtp',

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

'port' => 587,

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

'encryption' => 'tls',

'username' => 'username',

'password' => 'password',

'sendmail' => '/usr/lib/sendmail -t',

'pretend' => false,

Again, these settings work great on DigitalOcean and Xampp locally.

Thanks for any help you guys can provide.

Last updated 9 years ago.
0

Just to add a note to answer my own question above regarding if gmail can be combined with smtp through GoDaddy hosting. I spent a while chatting online with a GoDaddy customer service rep who told me that it's not possible unless you have their dedicated server plan, and even then it requires a work around. I have a shared hosting plan, so I gave up trying to send my emails from my web app using gmail. One can use smtp with the following settings, but only with your own domain's email.

'driver' => 'smtp',

'host' => 'localhost',

'port' => 587,

'from' => array('address' => 'myemail@your_godaddy_domain_name.com', 'name' => 'name'),

'encryption' => 'tls',

'username' => 'your cPanel username',

'password' => 'your cPanel password',

'sendmail' => '/usr/lib/sendmail -t',

'pretend' => false,

The rep also encouraged me to use PHP's "mail" function instead, but I haven't seen a good tutorial on how to use that yet. If one exists, I'd be glad for someone to point me to it. Thanks and hopes this helps someone with similar questions.

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Clox clox Joined 13 Apr 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.