Sendy is a self-hosted, PHP based newsletter service that lets you send trackable newsletters using Amazon Sending Email Service (SES), a service that allows sending bulk emails at very low cost. Amazon SES charges $1 per 10000 emails, while the other services charge much more. You can also use different SMTPs to send the newsletter emails.
The best thing about Sendy is that it is domain specific. For a one-time fee of $59 per domain, you could acquire a lifetime license of the service. This tutorial is about acquiring license for Sendy and installing it on Cloudways. Once you have bought the license for Sendy, follow the steps and install it on Cloudways. Sign up on Cloudways, if you have not done already! Once done, you need to launch a server with PHP Stack application
Step 1: Create AWS Account
To Install Sendy, you need to create an account on AWS. To do this, follow this guide.
Step 2: Creating Access Credentials on AES
Access Credentials are the “keys” which are essential for installation and are used by Sendy in sending emails through SES. For this, visit here,and create a new user.
In the window that opens, type Sendy in the space for the first user and click on Create.
Once the user is created, a new window will open. Click Download Credentials and save the file to your system. These credentials will be used when installing Sendy.
If you wish to send emails using SES, you need to follow the steps as defined in this guide. I will be using SMTP to send email with Sendy. Let’s get started with the installation.
Step 3: Installing Sendy on Cloudways
Once you have purchased license for Sendy, an email with a license number and the download link will be sent to you. Click on download Sendy button and the Zip file will be downloaded to your machine.
Now go to Cloudways Console and select the server where you wish to install Sendy. Alternatively, Add New server with PHP stack application, if you want to run Sendy on a standalone server. If you want to add Sendy to an existing server, click on the detail button of your desired server and then click on Add Application.
At Add Application page, select PHP Stack application, name your app Sendy and select the project that you have created for Sendy. You could also leave the default values.
Wait for Cloudways to add new application to your server.
Once the your new application is added, open the FTP client and login with your server credentials (Found at your server in the Master Credentials Tab).
Before uploading Sendy to the server, we need to extract it into a folder, insert your database credentials and your domain in it so we can install it. For this, go to folder in which you have downloaded Sendy and extract the zip file. Once the Zip file is extracted, open the folder and head to Includes Folder in the open config.php file. In the config file, fill the database hostname, username and password and then save it. $dbhost will be localhost and the rest of database credentials can be found under your Application Management -> Access Details Tab..
After adding database credentials, add your site domain in the define(‘APP_PATH’, ‘http://your_Sendy_installation_url‘)
I will be using FileZilla for this tutorial.
Once it’s connected, goto your app folder in which Sendy will be installed, Open public_html folder and upload the folder in it.
Once it is uploaded, change the upload folder permission inside Sendy directory to 777 . Now go to your website. Add /Sendy to the url. The installation page will open.
Fill the required informations and enter the license key that was given to you on purchase. In the AWS Access Key ID and Secret, fill in the same values that were downloaded in Step 2. Select your timezone and click on Install. Once installation finishes, a login page will open. Login with the email and password that you used while Installing Sendy and sign in.
Since we will be sending email using our own SMTPs in the next step, we will now configure Sendy to send emails with SMTPs.
Step 4: Setting Up SMTP in Sendy
Once you are logged in, go to the right top side of the screen where your name is being displayed. Click on the drop-down and from the list, select Setting.
On the Settings page, remove your AWS details and click on save.
Once the settings is save, go to Brands drop-down button which is visible on the top and click on Add new Brand.
On the brand page, fill in the required informations. Use the same email address which you will be using to send email via SMTP.
Once the brand information is filled, go to the SMTP settings and fill the SMTP settings of the email provider you are using. In the example I will be using RackSpace SMTP.
Now add a new email address in Client Login Details. This email address will be used by this brand when sending campaign emails. Click Save. Your brand is created and is ready to send campaign emails.
Now that we have created a Brand, let us now make a campaign for this Brand and send it to our subscribers.
Step 5: Creating and Sending Campaign To Subscribers
When you click on a newly created brand (in our case Cloudways), a new page will open that shows all campaigns that we have created. For now, there will be none. Let us create our first campaign.
Click on Create & Send Campaign button.
In the new window, fill the information about the campaign. Attach an image if you like, and your custom Query string to get a reference that user is coming through Sendy for your analytics. Once done, click Save & Next Button.
Let us now create a list of subscribers who will be getting this email. For this,click on View All List which is on the left of page.
At the new page, click on Add new List and hit Enter. Now you can import the emails from a CVS file.
You could also add the emails manually.
Once you have added the emails of subscribers, head back to the All Campaigns page and click on your Campaign Draft (in my case it is a Giveaway).
In the Define recipients, double click on your newly created list and click on Send newsletter now!
Emails will now be delivered to the subscribers that are found in the list.
You can use Sendy to create unlimited brands and campaigns and track the number of subscribers who have read your emails. Let me know if you face any issues in installing and configuring Sendy. I will help you out. 🙂
Changing Session Path for Sendy:
If you are frequently getting Outgoing connections blocked’ error, then this is the issue of session path, as stated in the official Sendy Troubleshoot Solutions. So if you are facing the same problem in Cloudways here is how you can solve it.
Follow these steps:
Launch SSH Terminal from Server Management and Login with your Master Credentials. Once you are logged in, head to the folder where you have installed Sendy using the following command:
cd applications/<folder name>/public_html/sendy
Now create a new folder here and name it session by inserting the following command and give it write permissions:
mkdir session chmod 77 session
In this folder we will save our Sendy sessions. Now head to includes folder by following command:
Now in this folder we will edit Sendy header.php file and there we will set our session path using ini_set() function. Now open header.php with the following command.
Now press ‘i’ to start editing the file. Paste the following line of code before include:
ini_set('session.save_path', '/home/master/applications/<folder name>/public_html/sendy/session'); include('includes/functions.php');
Change the <folder name> with your folder name. Once the line is added press Esc and then type :wq to save and exit the file. Now your session path is changed and your session will now store it in the session folder.
In case the above method does not work, you could refer to the excellent comment by Butch Ewing.
Launch PHP websites without the worry of Server Management.
Pre-Installed Optimized Stack with Git, Composer & SSH
Ahmed was a PHP community expert at Cloudways - A Managed PHP Hosting Cloud Platform. He is a software engineer with extensive knowledge in PHP and SEO. He loves watching Game of Thrones is his free time. Follow Ahmed on Twitter to stay updated with his works. You can email him at email@example.com