Email - AwardSpace.com https://www.awardspace.com/kb/email/ Free Web Hosting with PHP, MySQL, Email Sending, No Ads Thu, 17 Oct 2024 10:08:44 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 https://www.awardspace.com/wp-content/uploads/2022/09/awardspace-favicon-120x120.png Email - AwardSpace.com https://www.awardspace.com/kb/email/ 32 32 What is an Email Client https://www.awardspace.com/kb/what-is-an-email-client/ Fri, 23 Feb 2024 11:50:17 +0000 https://www.awardspace.com/?p=48673 Once you’ve chosen the best hosting plan for you, registered a domain name, and created your website, the next logical thing to do is to create an email address for you and your team (if you have one). The emails that are connected to your domain name differ from the ones that everyone might register […]

The post What is an Email Client appeared first on AwardSpace.com.

]]>
Once you’ve chosen the best hosting plan for you, registered a domain name, and created your website, the next logical thing to do is to create an email address for you and your team (if you have one). The emails that are connected to your domain name differ from the ones that everyone might register for free on the net, as they are more professional and naturally more trustworthy.

Related: How to Register a Domain Name: The Right Way

Depending on the size of the business or the target groups that you have, you might need more than one email address. The basic one is the email address that will get all the emails from the contact form on the Contact Us page. Others might include your email, an email that you will use to reach out to other businesses, an email for separate issues, like support@yourdomain.com, etc.

Related:  Contact Page: 5 Reasons You Absolutely Need One on Your Website

No matter how many emails you have, you will need an Email Client to be able to read your inbox.

 

What is an Email Client

An email client is a software application that enables users to manage their email accounts. It allows you to send, receive, and organize email messages without needing to use a web browser to access your email service provider’s web interface. Email clients can be either desktop applications, web-based applications, or mobile apps.

Key features of email clients include:

  • Email Management: Users can organize emails into folders or categories, flag emails for follow-up, and search through their email archives.
  • Multiple Account Integration: Many email clients allow users to manage multiple email accounts from different providers within a single interface.
  • Offline Access: Desktop and mobile email clients can store emails locally, allowing users to read and compose emails without an internet connection. The changes are synchronized with the email server once the connection is restored.
  • Attachments: Users can easily attach files to their emails and download attachments from incoming emails.
  • Customization: Email clients often offer a variety of settings for customization, including layout preferences, signature setups, and rules for automatic email handling.
  • Security Features: Many email clients include built-in security features such as spam filtering, phishing protection, and encryption options to enhance email privacy and security.

Popular examples of email clients include Microsoft Outlook, Mozilla Thunderbird, Apple Mail, and for mobile devices, apps like Gmail and Outlook Mobile. Web-based email clients like Gmail and Outlook.com can also be considered email clients, though they operate within a web browser.

 

Popular Email Clients

 

Microsoft Outlook

  • Overview: Microsoft Outlook is a part of the Microsoft Office suite, known for its comprehensive email management capabilities. It’s widely used in corporate environments due to its integration with Microsoft Exchange Server and Office 365, offering robust support for email, calendars, contacts, tasks, and more.
  • Key Features: Outlook provides advanced email organization, search, and filtering capabilities. It includes a calendar to manage appointments and meetings, task management features, contact management, and the ability to work with multiple email accounts. Outlook also offers extensive customization options, including rules for automatic email handling, custom themes, and add-ins for enhanced functionality.
  • Platforms: Desktop (Windows, macOS), Web, and Mobile (iOS, Android).

Related: How to Configure Your Email Account in Microsoft Outlook?

 

Mozilla Thunderbird

Mozilla’s Thunderbird is among the most popular desktop-based email clients.

  • Overview: Mozilla Thunderbird is a free and open-source email client developed by the Mozilla Foundation. It’s known for its flexibility, security features, and support for various email protocols and extensions.
  • Key Features: Thunderbird offers easy setup for email accounts, news feed subscriptions, and chat. It has strong privacy and security measures, including phishing protection and support for various encryption standards. Users can customize Thunderbird with themes and add-ons, and it also provides features like tabbed email, an integrated RSS reader, and smart folders.
  • Platforms: Desktop (Windows, macOS, Linux).

Related: How to Configure Your Email Account in Mozilla Thunderbird?

 

Apple Mail

  • Overview: Apple Mail, also known simply as Mail, is the default email client included with macOS, iOS, and iPadOS devices. It offers a straightforward, user-friendly interface and integration with Apple’s ecosystem.
  • Key Features: Apple Mail supports iCloud Mail as well as other email providers like Gmail, Outlook, and Yahoo! Mail. It offers features like VIP mailboxes, which prioritize emails from important contacts, and integration with Siri for voice commands. Apple Mail also provides a Focus mode to filter notifications based on current activity, and it works seamlessly across all Apple devices.
  • Platforms: macOS, iOS, iPadOS.

Related: How to Configure My Email Account in Apple Mail?

 

Gmail (Mobile App and Web)

Gmail is one of the most popular web-based email clients.

  • Overview: Gmail, developed by Google, started as a web-based email service and has expanded to include mobile applications. It’s known for its large storage capacity, powerful search capabilities, and integration with Google’s suite of applications like Google Drive, Docs, and Calendar.
  • Key Features: Gmail offers robust spam filtering, categorization of emails into tabs (Primary, Social, Promotions), and support for email scheduling and confidential mode, which allows sending emails that expire. It also includes smart replies and nudges to follow up on emails. The mobile app provides a consistent experience with the web service, offering offline access and notification management.
  • Platforms: Web, Mobile (iOS, Android).

 

Conclusion

No matter what type of website you have, having a contact form is a must. Even for personal blogs, it is recommended to let people give you their opinions. That will both inspire you and help you understand how you are doing what you are doing.

To let people communicate with you, you need to have an email client. Without an email client, you won’t be able to send, nor receive emails.

The post What is an Email Client appeared first on AwardSpace.com.

]]>
How to Configure Your Email Account in Microsoft Outlook? https://www.awardspace.com/kb/configure-email-in-outlook/ Mon, 10 May 2021 07:34:17 +0000 https://www.awardspace.com/?p=49281 Outlook is a Microsoft mail client which is part of the Microsoft Office suite. In this article, we will guide you on how to configure your email account with AwardSpace inside Outlook.   How to Configure My Email Account? Setting up an email account in Outlook is quite easy to accomplish and can be done […]

The post How to Configure Your Email Account in Microsoft Outlook? appeared first on AwardSpace.com.

]]>
Outlook is a Microsoft mail client which is part of the Microsoft Office suite. In this article, we will guide you on how to configure your email account with AwardSpace inside Outlook.

 

How to Configure My Email Account?

Setting up an email account in Outlook is quite easy to accomplish and can be done by following the below steps:

  • Start MS Outlook. Open the File menu and click Add Account. Select the Manual setup or additional server types checkbox and press Next.
email account settings 3
  • On the next page, you will be prompted to choose a service (account) type. Mark the POP or IMAP checkbox and press Next.
email account settings 4
  • Enter the following email connection settings:

Your Name: Give your account a name (for example, John Smith)
Email Address: Enter your AwardSpace.com email account’s full address (for example, name@yourdomain.com)
Account Type: IMAP
Incoming mail server: mboxhosting.com (if you are on a free plan, please use free.mboxhosting.com)
Outgoing mail server (SMTP): mboxhosting.com (if you are on a free plan, please use free.mboxhosting.com)
User Name: name@yourdomain.com
Password: The password for name@yourdomain.com
Remember password: Must be checked
Require logon using Secure Password Authentication (SPA): Must be unchecked

email account settings 5

Note: Please make sure you replace name@yourdomain.com with your AwardSpace.com email account!

  • Next, click the More Settings button and open the Outgoing Server tab.
email account settings 6

Tick the My outgoing server (SMTP) requires an authentication checkbox. Choose “Use the same settings as my incoming mail server” and press OK.

Note: If you wish to connect to your mail server securely (over SSL), open the Advanced tab and change the IMAP and SMTP server ports, to 993 and 465 respectively. Next, click OK and change the outgoing and incoming address to mboxhosting.com (if you’re on a free hosting plan, you should configure free.mboxhosting.com).

email account settings 8
  • Click Next to finalize the setup.

Congratulations! You have successfully configured your email account in MS Outlook.

The post How to Configure Your Email Account in Microsoft Outlook? appeared first on AwardSpace.com.

]]>
How to Configure Your Email Account in Mozilla Thunderbird? https://www.awardspace.com/kb/configure-your-email-in-thunderbird/ Mon, 10 May 2021 07:34:13 +0000 https://www.awardspace.com/?p=49284 Mozilla Thunderbird is a free open-source email client. You can download it from the official Thunderbird website. In this article, we will guide you through the process of configuring your AwardSpace email account with Thunderbird.   How to configure your email account? You can configure Thunderbird to work with your email account in 4 easy […]

The post How to Configure Your Email Account in Mozilla Thunderbird? appeared first on AwardSpace.com.

]]>
Mozilla Thunderbird is a free open-source email client. You can download it from the official Thunderbird website. In this article, we will guide you through the process of configuring your AwardSpace email account with Thunderbird.

 

How to configure your email account?

You can configure Thunderbird to work with your email account in 4 easy steps:

  • Start Mozilla Thunderbird.
  • Open the File menu, click New and choose Existing Mail Account.
email account settings 6
  • A new window will appear prompting you to enter your AwardSpace.com e-mail account’s connection settings.

Enter the following details in the corresponding fields:

Your name: Give your account a name (e.g. John Smith)
Email address: Enter your email address
Password: Type your email account password
Incoming (IMAP) server name: mboxhosting.com (if you are on a free plan, please use free.mboxhosting.com)
Incoming (IMAP) server port: 143
Outgoing (SMTP) server name: mboxhosting.com (if you are on a free plan, please use free.mboxhosting.com)
Outgoing (SMPT) server port: 25 or 587
User Name: name@yourdomain.com
SSL: STARTTLS
Authentication: Normal password

email account settings 7

Note: If you wish to establish a more secure connection (SSL) to your mail server, please change the IMAP and SMTP server address to mboxhosting.com (if you’re on a free hosting plan, you should be using free.mboxhosting.com) and change the SSL protocol to SSL/TLS. Thunderbird will automatically switch the default STARTTLS ports (143 & 25) to 993 and 465.

email account settings 8
  • Click Done in order to finish the setup.

Congratulations! You have successfully configured your email account in Mozilla Thunderbird.

The post How to Configure Your Email Account in Mozilla Thunderbird? appeared first on AwardSpace.com.

]]>
How to Configure My Email Account in Apple Mail? https://www.awardspace.com/kb/configure-email-in-apple-mail/ Mon, 10 May 2021 07:20:13 +0000 https://www.awardspace.com/?p=49287 Apple Mail, as the name suggests, is the Apple default mail client. In this article, we will go through the process of configuring your AwardSpace email account with Apple Mail.   How to configure your mail account? To set up an email account on an iOS device, please follow the below process: Open the Settings […]

The post How to Configure My Email Account in Apple Mail? appeared first on AwardSpace.com.

]]>
Apple Mail, as the name suggests, is the Apple default mail client. In this article, we will go through the process of configuring your AwardSpace email account with Apple Mail.

 

How to configure your mail account?

To set up an email account on an iOS device, please follow the below process:

  • Open the Settings app in your Apple device and tap Accounts & Passwords.
email account settings 9
  • On the next screen, you will see various options, such as iCloud, Exchange, Google, and Other. Tap Other to continue.
email account settings 10
  • Tap Add Mail Account.
email account settings 11
  • Type your Name, Email, Password, and Description.
email account settings 12
  • Fill in the appropriate fields:

Name: Give your account a name (e.g. John Smith)
Email: Enter your email address (e.g. name@yourdomain.com)
Description: Type a descriptive name for your email account

Incoming mail server

Host Name: mboxhosting.com (if you are on a free plan, please use free.mboxhosting.com)
Username: name@yourdomain.com
Password: Your chosen password

Outgoing mail server

Host Name: mboxhosting.com (if you are on a free plan, please use free.mboxhosting.com)
Username: name@yourdomain.com
Password: Your chosen password

email account settings 13
  • Click Next to complete the setup.

Congratulations! Your email account has been configured successfully and is ready to use.

The post How to Configure My Email Account in Apple Mail? appeared first on AwardSpace.com.

]]>
My website cannot connect and send emails via SMTP. Why? https://www.awardspace.com/kb/cannot-send-emails-via-smtp/ Fri, 02 Apr 2021 12:33:01 +0000 https://www.awardspace.com/?p=48939 Communication with our users is important which helps us improve our services and the overall experience. Allowing you to communicate with your user base through your website is also important to us. However, if you try to set up an SMTP connection on your website you might end up with your connection being blocked. In […]

The post My website cannot connect and send emails via SMTP. Why? appeared first on AwardSpace.com.

]]>
Communication with our users is important which helps us improve our services and the overall experience. Allowing you to communicate with your user base through your website is also important to us. However, if you try to set up an SMTP connection on your website you might end up with your connection being blocked. In this article, we will go through what is blocking the SMTP connection on your website and how to resolve it.

 

What are Outgoing Connections?

The outgoing connections allow your script to establish a connection to another server. For example, a WordPress website requires an outgoing connection in order to connect to WordPress servers for updates or to install plugins and themes. Outgoing connections are also required by some plugins to connect to a third-party server for them to work. The outgoing connections are also required to establish a connection to an SMTP server.

 

What is blocking the connection and how to fix it?

In order to prevent abuse, we have outgoing connections disabled by default for all hosting plans. This prevents all scripts from establishing a connection with any server.

To send emails via SMTP through your script it is required to have the outgoing SMTP connections enabled. Having the outgoing SMTP connections disabled will prevent your scripts from sending emails via SMTP.

Once outgoing SMTP connections are enabled you will be able to connect your script to the mail server.

 

How to Enable Outgoing SMTP Connections?

Outgoing connections can be enabled from the Hosting Settings inside your Hosting Control Panel. You can also check our article in the Hosting Settings section.

However, at present, the Outgoing SMTP connection cannot be enabled manually by clients. If you would like to connect your script to an SMTP server you will have to submit a request to our technical support. You can submit your request either via Trouble Ticket or an email to support@supportindeed.com.

Be advised that outgoing connections are completely restricted on the free hosting plan. If you would like to connect your script to another server you will have to purchase one of our premium hosting plans.

The post My website cannot connect and send emails via SMTP. Why? appeared first on AwardSpace.com.

]]>
Cannot access email account – Connection to Storage Server failed https://www.awardspace.com/kb/cannot-access-email-account/ Tue, 16 Mar 2021 10:52:37 +0000 https://www.awardspace.com/?p=48574 A common issue is the error “Connection to Storage Server failed” inside the webmail client. There are a couple of reasons for why you received this error. In this article we will find out how to solve the “Connection to Storage Server failed” error”.   What causes the error? Most commonly the error is caused […]

The post Cannot access email account – Connection to Storage Server failed appeared first on AwardSpace.com.

]]>
A common issue is the error “Connection to Storage Server failed” inside the webmail client. There are a couple of reasons for why you received this error. In this article we will find out how to solve the “Connection to Storage Server failed” error”.

 

What causes the error?

Most commonly the error is caused due to incorrect DNS records. For example, you have hosted the domain but you did not update your name servers and thus your domain was not pointed to us. You could also have this error if you have entered incorrect DNS records for our mail services.

Another reason for this error is the use of Cloudflare. The way Cloudflare works is that it hides the real DNS records of the domain behind a proxy. If you do a DNS lookup of a domain that manages its DNS records from Cloudflare you will see only Cloudflare records.

 

How to fix the error?

Solving the above would take you just a couple of steps regardless if you are using Cloudflare or not.

First, let’s see how the issue is resolved when you are not using Cloudflare. Check if you have correctly changed your domain name servers. If you are not using name servers to point your domain to us then you need to make sure that your domain DNS records are using the correct records for our mail services. If you have recently pointed your domain to us you will have to wait 24-48 hours for the DNS changes to take effect.

If you are using Cloudflare for your domain management you will have to make a few changes to the mx.yourdomain.com and mail.yourdomain.com hostnames. As mentioned previously Cloudflare hides the DNS records behind a Proxy. Because of this, it is not possible to connect directly to the mail server. To resolve this all you need to do is log in to your Cloudflare panel and disable HTTP proxy for these hostnames and set it to DNS only.

If you need assistance with configuring Cloudflare you can refer to our Cloudflare article here.

The post Cannot access email account – Connection to Storage Server failed appeared first on AwardSpace.com.

]]>
How Do I Create a Working Contact Form Using PHPMailer 6? https://www.awardspace.com/kb/create-contact-form-using-phpmailer/ Thu, 11 Jul 2019 13:38:45 +0000 https://www.awardspace.com/?p=41956 One of the easiest ways to build a loyal following for your website is to give your site visitors a quick and convenient way to get in touch with you. And while simply listing your email address on a contact page will get the job done, the experience will not be very seamless. Not to […]

The post How Do I Create a Working Contact Form Using PHPMailer 6? appeared first on AwardSpace.com.

]]>
One of the easiest ways to build a loyal following for your website is to give your site visitors a quick and convenient way to get in touch with you. And while simply listing your email address on a contact page will get the job done, the experience will not be very seamless. Not to mention that the email address which you publish will be scraped by bots and you will find yourself on countless SPAM mailing lists.

A better solution is to integrate a contact form into your website. A contact form has two major advantages over giving your visitors your email address. On one hand, filling out a contact form is quicker and more convenient than opening a mail program and composing a message there. And on the other hand, you never share your email address publicly, thus protecting your own privacy. In this tutorial, we will show you how you can create a simple contact form using PHPMailer.

 

What Is the Difference Between PHPMailer and the PHP Mail() Function?

If you have spent any time researching how to create a PHP mailer script online, chances are that you have come across the terms PHPMailer and PHP Mail() function. These two terms sound remarkably similar, but in reality, they refer to different pieces of technology.

The PHP Mail() function is a part of the vanilla PHP installation and is available for use right out of the box. It is fully capable of powering a simple PHP mail script for a contact form. If you are interested in using the PHP Mail() function, you should check our article on how to create a working PHP Mail() script for a contact form. We also have an article that explains how to create a general-purpose mailing script that is powered by the PHP Mail() function.

PHPMailer, on the other hand, is a third-party library written in PHP, which makes the sending of email messages much easier. Moreover, it allows advanced functionality that is not found in the stock PHP Mail() function, such as the sending of attachments and using HTML/CSS to add custom formatting to your messages.

In this guide, we will focus on PHPMailer as the technology that will power our free email form script. More specifically, we will use the latest version of PHPMailer which at the time of writing is PHPMailer version 6.0.7. We will also provide a free download link for our PHP email contact form example.

 

What Are the Requirements for a PHPMailer Form to Send Email Messages Successfully?

We wish all of our clients to have successful websites regardless of the hosting plan they use. As a result, creating a contact form using PHPMailer is possible on all of our hosting plans, including our free hosting package. The only requirement is to have an email account created through the Email Accounts section of the Control Panel. This email account will act as the sender of the messages created through our free form-to-email script example.

In order to create an email account, you need to be hosting a fully-qualified domain name. You can opt to purchase a premium domain name or you can get a free .DX.AM domain name through the Domain Manager section of the Control Panel. If you are not sure how to use the Email Accounts section of the Control Panel, you can check our in-depth guide on how to create an email account.

 

How to Create a PHPMailer Contact Form?

Once you have a working email account in your hosting space, you can start building your PHPMailer form-to-email script. Follow along as we show you how to set up a PHP contact form on your website:

  1. Head over to the official Github page for the PHPMailer project.
  2. Click on the Clone or download button.
  3. Choose Download ZIP, as shown in the screenshot below:
Downloading the official PHPMailer library is the first step to building a contact form using PHPMailer.
Downloading the official PHPMailer library is the first step to building a contact form using PHPMailer.
  1. Once PHPMailer finishes downloading, extract the downloaded ZIP archive, so you have direct access to all files and folders contained therein.
  2. Open the File Manager section of the Control Panel.
  3. Double-click on your domain folder in order to open it.
  4. Click on the Create button in order to make a new file. From the popup menu choose to create a file and name it contact.html as shown below:
Creating the contact.html file which will contain the contact form fields that the site visitors will fill out.
Creating the contact.html file which will contain the contact form fields that the site visitors will fill out.
  1. Double-click the newly created contact.html file in order to open it.
  2. Copy the code below and paste it inside of the contact.html file. This code will create a contact form page that your visitors will later fill in order to get in touch with you.
<html>
     <head>
         <title>
             Contact Form
         </title>
     </head>
     <body>
         <center>
             <font size="5">
             <b>Contact Form</b>
             <br/>
             <br/>
             </font>
             <form method="POST" action="mail-script.php">
                 Subject:
                 <input type="text" name="subject" size="20">
                 <br/>
                 <br/>
                 Name:
                 <input type="text" name="name" size="20">
                 <br/>
                 <br/>
                 E-mail:
                 <input type="email" name="email" size="20">
                 <br/>
                 <br/>
                 Message:
                 <br/>
                 <textarea rows="9" name="message" cols="30">
                 </textarea>
                 <br/>
                 <br/>
                 <input type="submit" value="Send" name="submit">
             </form>
         </center>
     </body>
 </html>
  1. Save your changes and close contact.html.
  2. Use the Create button one more time to make a new file. This time, call the file mail-script.php, as is shown in the screenshot below:
Creating the mail-script.php file which will hold the mail sending logic.
Creating the mail-script.php file which will hold the mail sending logic.
  1. Open the newly created mail-script.php file by double-clicking on it.
  2. Copy the code below and paste it into the mail-script.php file.
<?php

    use PHPMailer\PHPMailer\PHPMailer;
    use PHPMailer\PHPMailer\Exception;

    $myAwardSpaceEmail = "your-AwardSpace-email-goes-here";
    $myAwardSpaceEmailPassword = "your-AwardSpace-email-password-goes-here";
    $myPersonalEmail = "your-personal-email-goes-here";

    require './src/Exception.php';
    require './src/PHPMailer.php';
    require './src/SMTP.php';

    if(isset($_POST['submit'])) {

        $mail = new PHPMailer(true);

        $mail->SMTPDebug = 0;

        $mail->Host = 'smtp.mboxhosting.com';
        $mail->SMTPAuth = true;
        $mail->Username = $myAwardSpaceEmail;
        $mail->Password = $myAwardSpaceEmailPassword;
        $mail->SMTPSecure = 'tls';
        $mail->Port = 587;

        $mail->setFrom($myAwardSpaceEmail, 'Mailer');
        $mail->addAddress($myPersonalEmail);
        $mail->addReplyTo($_POST['email'], $_POST['name']);

        $mail->isHTML(true);    
        $mail->Subject = $_POST['subject'];
        $mail->Body = $_POST['message'];

        try {
            $mail->send();
            echo 'Your message was sent successfully!';
        } catch (Exception $e) {
            echo "Your message could not be sent! PHPMailer Error: {$mail->ErrorInfo}";
        }
        
    } else {
        echo "There is a problem with the contact.html document!";
    }
    
?>
  1. Near the start of the file, you will notice the following three lines of code:
$myAwardSpaceEmail = "your-AwardSpace-email-goes-here";
$myAwardSpaceEmailPassword = "your-AwardSpace-email-password-goes-here";
$myPersonalEmail = "your-personal-email-goes-here";

These lines will need to be edited a bit:

  • on the first line, you need to replace your-AwardSpace-email-goes-here with the email address that you previously created through the Email Account section of the Control Panel.
  • on the second line, you need to replace your-AwardSpace-email-password-goes-here with the password that you set for your AwardSpace-hosted email address (the one you entered on the previous line). Entering your password here is necessary so that you can authenticate yourself successfully with the mail server. If you are worried that including your password may expose it to your site visitors by accident, we would like to reassure you that PHP scripts are processed on the server only and are never sent to your visitors’ web browsers.
  • on the third line, you need to replace your-personal-email-goes-here with the email address where you would like to receive the emails generated by the contact form. If you wish, you can receive these emails in the inbox of your AwardSpace-hosted email.
  1. Once you have made the above changes, you can click on the Save button and close the mail-script.php file.
  2. Click the Create button. This time we will create a new directory called src as shown in the screenshot below:
Creating a new src directory which will house the PHPMailer files.
Creating a new src directory that will house the PHPMailer files.

Important: in order for the contact form to work properly, make sure that the src folder is placed in the same directory as the contact.html and mail-script.php files.

  1. Double-click the newly created src directory in order to open it.
  2. Click on the Upload button in order to add files from your local computer.
  3. In the window that appears, click on the button that says Click to select files as shown in the screenshot below:
The File Manager allows you to upload files stored on your computer.
The File Manager allows you to upload files stored on your computer.
  1. A file picker window will pop up. Navigate to the place on your computer where you extracted the PHPMailer files (the action you performed in Step 4).
  2. Open the src directory contained within the extracted PHPMailer files on your computer. The src directory you should contain five files – Exception.php, OAuth.php, PHPMailer.php, POP3.php, and SMTP.php.
  3. Select all five files in the file picker window and choose to upload them.
  4. The files should now be added to the Upload window in our File Manager. Click on the Upload button in order to upload all five files at the same time.
  5. Close the Upload window. At this point the src directory in the File Manager should contain the five files as shown in the screenshot below:
The PHPMailer files were successfully uploaded on your site!
The PHPMailer files were successfully uploaded on your site!
  1. That’s it! At this point, you should have a fully functional PHP email script and HTML form! Continue reading to see how you can test your contact form.

 

How Do I Verify That the Free PHP Mailer Script Works as Expected?

Now that the free PHP email script and all accompanying files have been successfully uploaded, you can try testing your script. To do so, follow these steps:

  1. Open your web browser and navigate to the contact.html document. You can do so using the URL http://your-domain.com/contact.html. Make sure that you replace your-domain.com with your actual domain name.
  2. Fill in the contact form fields as shown in the screenshot example below and click on the Send button:
The PHP email script and the HTML form working together to enable the contact form functionality.
The PHP email script and the HTML form work together to enable the contact form functionality.
  1. If all goes well, you should see Your message was sent successfully! displayed on the screen.
  2. All that is left to do now is to check whether the contact form submission has actually sent a message to your inbox. Check your personal email for new messages:
Hooray, your site visitor's message was successfully delivered to your personal inbox!
Hooray, your site visitor’s message was successfully delivered to your personal inbox!

 

Where Can I Download the PHPMailer Example Form?

If you don’t have time to manually create and upload all files necessary for your contact form to function, you can download the complete PHP email contact form example as a ZIP archive. This PHPMailer example form is fully functional, you just need to enter your email address and password, as outlined in Step 14 above.

 

How Can I Make the PHPMailer Example Form Send Messages Using an External Mail Server over SMTP?

Unlike the stock PHP Mail() function, PHPMailer makes is super easy to send email messages using an external mail server over SMTP. In fact, the whole process of creating a contact form is nearly identical to the one we previously discussed in this article. The only major difference is that a modified version of the mail-script.php file needs to be used.

Note: the ability to contact external mail servers requires advanced server functionality which is only possible if you are using one of our paid hosting plans. If you are already on a paid plan, contact the 24/7 Technical Support Team and ask them to enable SMTP outgoing connections for your hosting account if you haven’t done so already.

If you would like to have a contact form that uses external mail servers to send messages, follow the same steps as the ones outlined above. The only two steps that are different are Step 13 and Step 14, so return here when you get to them. Here are the two modified steps:

  1. Copy the code below and paste it into the mail-script.php file.
<?php

    use PHPMailer\PHPMailer\PHPMailer;
    use PHPMailer\PHPMailer\Exception;

    $myPersonalEmail = "your-personal-email-goes-here";
    
    $externalMailHost = "your-external-mail-server-address-goes-here";
    $externalMailAddress = "your-external-email-address-goes-here";
    $externalMailSMTPAuth = true;
    $externalMailUsername = "your-username-for-the-external-mail-server-goes-here";
    $externalMailPassword = "your-password-for-the-external-mail-server-goes-here";
    $externalMailSMTPSecure = "tls";
    $externalMailPort = 587;
    

    require './src/Exception.php';
    require './src/PHPMailer.php';
    require './src/SMTP.php';

    if(isset($_POST['submit'])) {

        $mail = new PHPMailer(true);

        $mail->SMTPDebug = 0;
        $mail->isSMTP();

        $mail->Host = $externalMailHost;
        $mail->SMTPAuth = $externalMailSMTPAuth;
        $mail->Username = $externalMailUsername;
        $mail->Password = $externalMailPassword;
        $mail->SMTPSecure = $externalMailSMTPSecure;
        $mail->Port = $externalMailPort;
        
        $mail->setFrom($externalMailAddress, 'Mailer');
        $mail->addAddress($myPersonalEmail);
        $mail->addReplyTo($_POST['email'], $_POST['name']);

        $mail->isHTML(true);    
        $mail->Subject = $_POST['subject'];
        $mail->Body = $_POST['message'];

        try {
            $mail->send();
            echo 'Your message was sent successfully!';
        } catch (Exception $e) {
            echo "Your message could not be sent! PHPMailer Error: {$mail->ErrorInfo}";
        }
        
    } else {
        echo "There is a problem with the contact.html document!";
    }
    
?>
  1. Near the start of the file, you will notice the following lines of code:
$myPersonalEmail = "your-personal-email-goes-here";
    
$externalMailHost = "your-external-mail-server-address-goes-here";
$externalMailAddress = "your-external-email-address-goes-here";
$externalMailSMTPAuth = true;
$externalMailUsername = "your-username-for-the-external-mail-server-goes-here";
$externalMailPassword = "your-password-for-the-external-mail-server-goes-here";
$externalMailSMTPSecure = "tls";
$externalMailPort = 587;

These lines represent your mail connection settings and you will need to update them. Below we will list the changes that need to be made on each line:

  • your-personal-email-goes-here should be replaced with the email address where you would like to receive your contact form submissions.
  • your-external-mail-server-address-goes-here should be replaced with the outgoing (SMTP) address of the mail server that you are using.
  • your-external-email-address-goes-here should be replaced with the email address that you have registered with the external mail server.
  • $externalMailSMTPAuth = true; indicates whether authentication is required to send messages. Only change this line if instructed to do so by your email provider.
  • your-username-for-the-external-mail-server-goes-here should be replaced with your username for the external mail server. Oftentimes, your username is the same as your email address on the server.
  • your-password-for-the-external-mail-server-goes-here should be replaced with your external mail server password.
  • $externalMailSMTPSecure = "tls"; indicates the type of security which will be used. Only change this value if instructed to do so by your mail provider.
  • $externalMailPort = 587; is the default port for sending messages. Only change this value if instructed to do so by your mail provider.

That’s it, these are all the custom changes that you need to make in order to enable SMTP functionality in PHPMailer 6. You can now continue following the original guide starting at Step 15.

Note: Please keep in mind that external mail servers may be configured differently than the ones, provided by AwardSpace. As such, if your contact form submissions are not delivered successfully to your inbox, it is best to contact the external mail provider’s support team for further assistance. To aid in the troubleshooting process, locate the line of code $mail->SMTPDebug = 0; and change it to $mail->SMTPDebug = 2;. Doing so will provide a detailed event log when trying to send a message using the external mail server.

 

Where Can I Download the Version of the PHPMailer Example Form Which Uses an External Mail Server to Send Messages over SMTP?

If you wish to grab a copy of the PHPMailer example form that uses SMTP to connect to external mail servers, you can download the PHP mailer script for free as a ZIP archive. The contact form contained within the ZIP archive is fully operational and ready for use. You just need to update your personal email address and enter the SMTP details for your external mail server in order to be able to receive contact form submissions.

 

Conclusion

When compared to the standard PHP Mail() function, PHPMailer provides a lot of additional functionality without sacrificing ease of use. If you intend to build upon your contact form and implement additional features, such as allowing your site visitors to send you attachment files, PHPMailer is definitely the way to go. Last, but certainly not least, being able to use an external mail server with your contact form provides a level of freedom that is very difficult to achieve with the stock PHP Mail() Function.

The post How Do I Create a Working Contact Form Using PHPMailer 6? appeared first on AwardSpace.com.

]]>
Why I cannot send e-mails after configuring my e-mail account? https://www.awardspace.com/kb/unable-to-send-email/ Fri, 29 Sep 2017 12:06:17 +0000 https://www.awardspace.com/?page_id=14255 The most probable reason for this problem is that your Internet Service Provider, router, or software program is blocking the connection between your computer and our servers. To see if this is the cause of the problem, open the default telnet client for your device (please check the operating system manual for your device, for […]

The post Why I cannot send e-mails after configuring my e-mail account? appeared first on AwardSpace.com.

]]>
The most probable reason for this problem is that your Internet Service Provider, router, or software program is blocking the connection between your computer and our servers. To see if this is the cause of the problem, open the default telnet client for your device (please check the operating system manual for your device, for Windows it is “Command Prompt”) and execute the following command:

telnet mail.yourdomain.com 25

If you receive a response similar to “220 mail.yourdomain.com ESMTP”, the problem is not in the connection as you have successfully reached our mail servers, so you will need to double-check your mail settings for typos or other configuration errors.

If the response is different or there is no response from the server, it means something along the way is blocking the connection. You can try changing the “SMTP (Outgoing)” port from the default 25 to port 587 and see if this resolves your problem. If you still cannot connect, please consult with your ISP and/or your local computer technician for further assistance.

The post Why I cannot send e-mails after configuring my e-mail account? appeared first on AwardSpace.com.

]]>
How Do I Send an Email Message Using the PHP Mail() Function? https://www.awardspace.com/kb/php-mail-function/ Wed, 20 Sep 2017 13:24:14 +0000 https://www.awardspace.com/?page_id=13367 One of the most ubiquitous methods of communication nowadays is the sending and receiving of email messages. Unlike other forms of electronic communication, emails are very reliable and are universally accepted – when you send a message to someone, you know that they will be able to read it regardless of the operating system, email […]

The post How Do I Send an Email Message Using the PHP Mail() Function? appeared first on AwardSpace.com.

]]>
One of the most ubiquitous methods of communication nowadays is the sending and receiving of email messages. Unlike other forms of electronic communication, emails are very reliable and are universally accepted – when you send a message to someone, you know that they will be able to read it regardless of the operating system, email client, or mail provider they use. Due to these immense benefits, email has become the preferred method of communication for countless individuals and businesses around the world.

Writing email messages using your favorite email program or your mail provider’s web app is probably second nature to you. But did you know that you can also send messages via scripts from your hosting space? In this tutorial, we will show you how you can send email messages via a PHP script.

 

How Can I Check Whether the PHP Mail() Function Is Enabled on My Account?

Before you attempt to send an email message using the PHP mail() function, you should make sure the PHP mail() function is actually enabled on the server. You can perform this check by running a small test script. Follow the steps below in order to create this script and execute it:

  1. Open the File Manager section of the Control Panel. If prompted, log into your account.
  2. Open your domain name folder.
  3. Use the Create button to make a new file. Call the file something like test.php.
  4. Copy over the code below and save the file.
 <?php
    if(function_exists('mail')) {
        echo "PHP mail() function is enabled";
    }
    else {
        echo "PHP mail() function is not enabled";
    }
 ?>
  1. Now copy the path to the test script and run it in your web browser. The path should look something like .

If all goes well, you should see the message PHP mail() function is enabled as shown in the screenshot below:

The test script confirms that the PHP mail() function is enabled on the server.
The test script confirms that the PHP mail() function is enabled on the server.

If there is a problem, you will see a PHP mail() function is not enabled message. In the unlikely event that this happens, you should contact the 24/7 Technical Support Team so they can resolve any problems with the server.

The test script shows that the PHP mail() function is disabled which is likely due to a bad server configuration.
The test script shows that the PHP mail() function is disabled which is likely due to a bad server configuration.

 

Are Free Accounts Allowed to Send Messages Using the PHP Mail() Function?

If you are using our free hosting service, you may be worried that this functionality will not be available to you. The good news is that even free hosting accounts are allowed to use the PHP mail() function. There are just two caveats that you need to keep in mind.

First, to send an email message, you need to have an email account created in your hosting space. This email account will act as the sender. Email accounts can be created through the Email Accounts section of the Control Panel. To have an email account, you need to own a fully-qualified domain name or grab a free .DX.AM domain name from the Domain Manager.

The second caveat to note is that in order to prevent spammers from abusing our free service, we have limited the number of messages that can be sent to 31 messages in any given 31-day period. You can lift this restriction by upgrading to one of the paid hosting packages that we offer.

 

How Do I Send an Email Message Using the PHP Mail() Function?

Email messages can be sent via a PHP script by running it. Running a script is as simple as opening it in your web browser, just like a regular page on the web. Follow along as we show you how to create and run your first script that uses the PHP mail() function:

  1. Log in to the Hosting Control Panel.
  2. If you don’t have an email account yet, create one in the Email Accounts section of the Control Panel. Not sure how to make an email account? Check our guide on how to create an email account.
  3. Navigate to the File Manager section of the Control Panel.
  4. Double-click on your domain folder in order to open it.
  5. Use the Create button to make a new file. Call the file something like mail-test.php.
  6. Copy over the code below into the empty .PHP file you just created.
<?php

$awardspaceEmail = "FROM";
$recipientEmail = "TO";

$from = "From: Mail Contact Form <" . $awardspaceEmail . ">";
$to = $recipientEmail;

$subject = "PHP mail() Test";

$body = "This is a test message sent with the PHP mail function!";

if(mail($to,$subject,$body,$from)){
    echo 'E-mail message sent!';
} else {
    echo 'E-mail delivery failure!';
}

?>
  1. You will now have to make two additions to the script. Near the beginning of the script, you will notice the following line of code: $awardspaceEmail = "FROM";. You need to delete the FROM text and in its place enter the email address that you created earlier in Step 2 using the Email Accounts section of the Control Panel. Similarly, the next line is $recipientEmail = "TO";. Here you need to remove the TO text and replace it with the email address where you would like to receive your test message.
  2. After updating the two fields mentioned in the above step, save your changes.
  3. Now copy the path to the mail test script and run it in your web browser. The path should look something like .
  4. Once the script finishes loading, you should see the message E-mail message sent! printed on the screen if the message was sent successfully. If there’s a problem, you will see an E-mail delivery failure! instead. In case of an error, you can contact our 24/7 Technical Support Team and they will assist you in resolving any issues that are present.
  5. Verify that your script has successfully sent the test message by checking your email inbox. You should receive a test message that looks like the one shown below:
The PHP mail() function test script has successfully sent a message and it has arrived in the recipient's inbox.
The PHP mail() function test script has successfully sent a message and it has arrived in the recipient’s inbox.

 

Is There a Limit to the Number of Messages I Can Send Using the PHP Mail() Function?

As previously mentioned, the free hosting plan allows you to send up to 31 messages for a 31-day period. Upgrading to one of our paid shared hosting plans significantly increases this limit. With a paid plan you can send up to 1000 messages per day. If you need to send even more messages, our Semi-Dedicated hosting enables you to send up to 2000 messages per day. Last, but certainly not least, getting a Virtual Private Server (VPS) package would allow you to send an unlimited number of messages. A VPS is only limited by his hardware and processing power as to the number of messages it can send.

A word of warning: AwardSpace has a zero-tolerance policy when it comes to the sending of unsolicited email messages (SPAM). If you use our mail servers for such an activity, you risk having your hosting account permanently suspended without the option to get a refund.

 

How Do I Create a Contact Form for My Website?

Now that you are able to send messages via PHP scripts, you may have your sights set on implementing a full-blown contact form into your website. That’s actually surprisingly easy to do. We cover the whole process in our guide on how to create a working contact form.

 

Conclusion

The ability to send email messages through your website enhances the experience your visitors have when they visit your site. Implementing a contact form, sending order confirmation messages, and emailing a password reset link to a member of your site who has misplaced their password can all make your website much more professional and appealing. And best of all – PHP allows you to automate these messages, so once you set up your site, it will just work with no extra effort required on your part.

The post How Do I Send an Email Message Using the PHP Mail() Function? appeared first on AwardSpace.com.

]]>
How to Create a Working PHP Mail() Script for a Contact Form? https://www.awardspace.com/kb/contact-form-sample/ Wed, 20 Sep 2017 13:23:03 +0000 https://www.awardspace.com/?page_id=13364 Giving your visitors an easy way to reach you is a fundamental feature that every modern site should have. As such, having a working contact form is a must nowadays. In this article, we will show you how to set up a PHP contact form on your website and we will even provide you with […]

The post How to Create a Working PHP Mail() Script for a Contact Form? appeared first on AwardSpace.com.

]]>
Giving your visitors an easy way to reach you is a fundamental feature that every modern site should have. As such, having a working contact form is a must nowadays. In this article, we will show you how to set up a PHP contact form on your website and we will even provide you with a free PHP email script that you can download and use.

 

Is There a Difference Between PHPMailer and the PHP Mail() Function?

If you have previously researched how to connect your contact form to your email in PHP, you may have come across the terms PHP mail() function and PHPMailer. While they sound remarkably similar, these terms are in fact two distinct pieces of technology.

The PHP mail() function is a part of the standard PHP installation and is available out of the box. While it is very barebones in terms of features, it can still be used to create PHP mailer scripts. As such, the PHP mail() function works best when you need to send very basic email messages. For more information on the PHP mail() function, you can check our article on how to send emails using PHP mail().

The PHPMailer, on the other hand, is a free third-party package for creating sophisticated PHP email scripts. PHPMailer needs to be downloaded separately and integrated into your website. It supports advanced features, not found in the standard PHP mail() function, such as the sending of attachments and the creation of richly formatted email messages thanks to built-in support for HTML markup and CSS styling.

The present article will show you how to create a PHP mailer script using the built-in PHP mail() function. If you are interested in using PHPMailer, you can check our article on how to create a contact form using PHPMailer.

 

What Are the Requirements to Have a Working PHP Mail Script for My Contact Form?

We strongly believe that a working contact form is a feature that every website owner should have access to, regardless of the hosting plan they use. As a result, we allow contact form PHP files to be created and used on both our free hosting plan as well as our paid hosting packages.

In addition to having an active hosting plan, you also need to own a fully-qualified domain. You can either purchase a premium domain name or use the Domain Manager section of the Control Panel to register a free .DX.AM domain. Once you have a fully-qualified domain present in your hosting account, head over to the Email Accounts section of the Control Panel and register an email account. This account will be used for the actual sending of email messages. Not sure how to create an email account? You can review our guide on how to create an email account.

 

How Do I Set up a PHP Contact Form on My Website?

As long as you have an active hosting plan and there is an email account present in your hosting space, you can proceed to implement the contact form. The contact form itself is comprised of two files – a PHP email script that handles the actual email sending and an HTML form that your site visitors use to send you a message. To set up the PHP email script and HTML form, follow the steps below:

  1. Go to the File Manager section of the Control Panel.
  2. Double-click on your domain name’s folder in order to open it.
  3. Click on the Create button, switch to the option to Create File and make a new HTML document. Name it contact.html as is shown in the screenshot below.
Creating the contact.html file through the File Manager section of the Control Panel.
Creating the contact.html file through the File Manager section of the Control Panel.
  1. Once the contact.html file is created, double-click it in order to open it.
  2. Copy the code shown below and paste it into your contact.html file.
<html>
     <head>
         <title>
             Contact Form
         </title>
     </head>
     <body>
         <center>
             <font size="5">
             <b>Contact Form</b>
             <br/>
             <br/>
             </font>
             <form method="POST" action="mail-script.php">
                 Subject:
                 <input type="text" name="subject" size="20">
                 <br/>
                 <br/>
                 Name:
                 <input type="text" name="name" size="20">
                 <br/>
                 <br/>
                 E-mail:
                 <input type="email" name="email" size="20">
                 <br/>
                 <br/>
                 Message:
                 <br/>
                 <textarea rows="9" name="message" cols="30">
                 </textarea>
                 <br/>
                 <br/>
                 <input type="submit" value="Send" name="submit">
             </form>
         </center>
     </body>
 </html>
  1. Save your changes and close the contact.html document.
  2. Using the Create button, make a new file. This time call it mail-script.php. Make sure that this new file is placed in the same directory as the contact.html document. You may refer to the screenshot below:
Creating the mail-script.php file which will house the mail-sending logic for the contact form through the File Manager section of the Control Panel.
Creating the mail-script.php file which will house the mail-sending logic for the contact form through the File Manager section of the Control Panel.
  1. Double-click the newly created mail-script.php file in order to open it.
  2. Now copy the code below and paste it inside of the mail-script.php file:
<?php

    $myAwardSpaceEmail = "your-AwardSpace-email-goes-here";
    $myPersonalEmail = "your-personal-email-goes-here";
    
    if(isset($_POST['submit'])) {
        $subject = $_POST['subject'];
        $name = $_POST['name'];
        $email = $_POST['email'];
        $message = $_POST['message'];
        $headers = "From: Contact Form <" . $myAwardSpaceEmail . ">" . "\r\n";
        $headers .= "Reply-To: " . $name . " <" . $email .">" . "\r\n";
        
        echo 'Your message was sent successfully!';
        mail($myPersonalEmail, $subject, $message, $headers);
    } else {
        echo 'An error has occurred!';
    }
?>
  1. Near the start of the script you will see the following two lines of code:
$myAwardSpaceEmail = "your-AwardSpace-email-goes-here";
$myPersonalEmail = "your-personal-email-goes-here";

You need to edit these two lines in order for the script to work. On the first line, replace the text your-AwardSpace-email-goes-here with the email address that you created using the Email Accounts section of the Control Panel. Similarly, on the second line, you need to replace the text your-personal-email-goes-here with the email address where you would like to receive your contact form submissions. If you want, you can use your AwardSpace-created email address as the recipient of the messages, however, this is not mandatory.

  1. Save your changes and close the mail-script.php file.

All done! At this point, you should have a fully operational contact form that sends you an email message whenever someone uses it. All that is left is to test the contact form and make sure that it works as expected.

 

How Do I Test My PHP-Powered Contact Form?

Testing your contact form is a straightforward process:

  1. Navigate to your contact.html document using your web browser. You can do this by going to http://your-domain.com/contact.html (make sure that you replace your-domain.com with your actual domain name.
  2. Fill in the contact form as is shown below and click on the Send button.
The free HTML email form and PHP script in action.
The free HTML email form and PHP script in action.
  1. If everything goes well, the message Your message was sent successfully! should appear in your browser.
  2. All that is left to do now to check whether you have received the contact form submission as an email notification in your personal mail account’s inbox:
Hooray, your site visitor's message was successfully delivered to your personal inbox!
Hooray, your site visitor’s message was successfully delivered to your personal inbox!

 

Download the Files of the PHP Contact Form Example.

If you are in a hurry and don’t have time to create the HTML document and PHP mail script manually, you can download a zip archive that contains the PHP email contact form example files. Just make sure to add your personal and AwardSpace emails in the PHP script, so that the contact form can successfully send emails.

If you followed the steps above and manually created the contact.html and mail-script.php files, there is no need to download the zip archive.

 

Can I Use the PHP Mail() Function and SMTP to Send Messages Through an External Mail Server?

The free PHP-form-to-email script which we have created is only able to send email messages using your AwardSpace-hosted email address. You may be wondering if it is possible to use an external mail server and send your messages through SMTP. This is indeed possible, however configuring the PHP mail() function to utilize an external mail server is a rather complex process and it falls outside of the scope of this guide.

Fortunately, PHPMailer, the more feature-complete alternative to the PHP mail() function, which we discussed at the start of the guide, enables you to easily connect to external mail servers via SMTP. We cover this functionality in our guide on how to create a working contact form that is powered by PHPMailer. Note: the ability for your hosting account to communicate with external mail servers is advanced functionality only available if you are using one of our premium hosting plans.

 

Conclusion

There’s no better way to build a group of loyal visitors who regularly come to your site than to allow them to directly interact with you and to send you messages. And if your site is built around your business, having a contact form is even more important as it allows potential clients to get in touch with you in a hassle-free manner. No matter what type of site you have, chances are that it will greatly benefit from having an easy-to-use contact form. And while our contact form example is rather basic, it is a great starting point that you can develop further in the future.

The post How to Create a Working PHP Mail() Script for a Contact Form? appeared first on AwardSpace.com.

]]>