Awardspace php mail to gmail id

Awardspace is a web hosting company that provides PHP-based hosting services. To set up PHP mail to send emails to a Gmail ID, you'll need to configure your Awardspace account and PHP settings. Here's a step-by-step guide to help you achieve this:

Step 1: Enable less secure apps on your Gmail account

To allow PHP scripts to send emails from your Gmail account, you need to enable "Less secure app access" on your Google account settings. Follow these steps:

  1. Sign in to your Google account.
  2. Go to the Google Account settings page.
  3. Scroll down to the "Signing in to Google" section.
  4. Click on "App passwords" or "Less secure app access" (depending on your account type).
  5. Toggle the switch to "On" to enable less secure app access.

Step 2: Configure your Awardspace account

  1. Log in to your Awardspace account.
  2. Go to the "Email" section and click on "Configure email".
  3. Select "PHP Mail" as the email transport method.
  4. Enter your Gmail email address and password in the respective fields.
  5. Make sure the "Use SSL" option is enabled.

Step 3: Update your PHP settings

  1. Log in to your Awardspace account.
  2. Go to the "PHP Settings" section.
  3. Look for the "sendmail_path" setting and update it to the following value:
    /usr/sbin/sendmail -t -i

    This setting tells PHP to use the sendmail command to send emails.

Step 4: Test your PHP mail setup

  1. Create a PHP file with the following code:
    
    <?php
    $to = '[email protected]';
    $subject = 'Test email from Awardspace';
    $message = 'This is a test email sent from Awardspace using PHP mail.';

$headers = 'From: [email protected]'. "\r\n". 'Reply-To: [email protected]'. "\r\n". 'MIME-Version: 1.0'. "\r\n". 'Content-Type: text/plain; charset=UTF-8';

mail($to, $subject, $message, $headers); ?>


Replace `[email protected]` with your actual Gmail email address.

2. Upload the PHP file to your Awardspace account.
3. Access the PHP file through your web browser to test the email sending functionality.

If everything is set up correctly, you should receive an email at the recipient's email address. If you encounter any issues, check your Awardspace account settings, PHP settings, or Gmail account settings to troubleshoot the problem.