Godaddy SMTP settings in CakePHP emails

Spread the love

In this post, I will explain how can we use email settings of Godaddy for CakePHP 3 and how to configure Godaddy SMTP settings in CakePHP 3 for sending emails using Godaddy server.

If you want to use email functionality in your CakePHP 3 application and want to use SMTP settings then you have to follow certain steps to configure email on the server.

I am using below steps to configure email/SMTP settings of Godaddy for CakePHP 3.

Steps required for Godaddy SMTP settings in CakePHP 3

Step 1:

Login to your Godaddy hosting account and click on “My Products” link. This will show your product along with “Workspace Email” tab. “Manage” button present at extream right in this tab.

Step 2:

Click on “Manage” button, this will redirect you to your email settings account, having a name “Workspace Control Center“.

Step 3:

Now in your “Workspace Control Center” page you will see all of your email accounts and related data. Here please identify your primary email address for your hosting account. After identifying an email address, hover on a drop down icon present besides your email address, as shown in below image.

Step 4:

After hover, your will see a tab having all the options related to your specific email address for email settings in Godaddy. In this tab click on “Email Setup Center” link. This will redirect you to “Email Setup Center” page.

Step 5:

In “Email Setup Center” page you will see “Domain settings” and its available email quota in MBs. Below that you will see “Email Server Settings” tab. This tab contains, “Server” and its available standard port numbers, for incoming and outgoing servers.

Here we have to use “Outgoing server (SMTP)” settings. Now copy “Outgoing server (SMTP)” host address, in my case its “smtpout.secureserver.net“, it may vary as per your secure server email account. Under “Standard Ports” section it’s showing available ports. We have to use one of the ports present in this section in our CakePHP 3 email settings.

Configuring Godaddy SMTP settings in CakePHP 3 application.

Step 6:

Now in your CakePHP 3 application folder, go to “config” folder and open “app.php” file. And scroll over it up to “EmailTransport” settings.
In “EmailTransport” section change/add below settings:
1. in “className” add “Smtp
2. in “host” add “smtpout.secureserver.net“,
3. in “port” add “80“, you may add a different port number.
4. in “username” and “password” add your primary email address username and password.

Please see below “EmailTransport” settings:

'EmailTransport' => [
        'default' => [
            'className' => 'Smtp',
            // The following keys are used in SMTP transports
            'host' => 'smtpout.secureserver.net',
            'port' => 80,
            'timeout' => 30,
            'username' => '<Your username>',
            'password' => '<Your password>',
            'client' => null,
            'tls' => null,
            'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
        ],
    ],

Now, setup your CakePHP 3 email functionality in an application and see whether your email settings for CakePHP 3 are working properly.

That’s it. I am using above steps to configure Godaddy SMTP settings for CakePHP 3, and able to send email from CakePHP 3 application successfully, using Godaddy email service for SMTP. Hope this tutorial will help you for setting up your  CakePHP 3 application email with Godaddy mail settings.

education


Spread the love

2 thoughts on “Godaddy SMTP settings in CakePHP emails”

Leave a Comment