TMail - Multi Domain Temporary Email System

Contents

1. Receive emails FASTER!

2. Getting a 500 Error? Here is what you can do.

3. TMail Installation Tutorial

4. How to integrate WordPress Blogs?

5. How to add Favicon?

6. How to setup CRON to delete emails from server?

7. Full Screen View on TMail

8. How to add more domains to TMail?

9. How to add more languages?

10. How to add more ads directly inside files?

11. How to add Sitemap?

1. Receive emails FASTER!

You might have heard of AWS SES, MailGun, etc which are systems related to email service and they can also be used for receiving the emails. As you know that TMail requires an IMAP access to fetch emails, but neither AWS nor Mailgun provides an IMAP box.

So, we kept on looking for other providers who can provide that, then we came across a service called Business Email Hosting from BigRock.in

In case if you don't know BigRock.in, they are just like Godaddy & Namecheap but very popular in India.

They are providing a mailbox at a super cheap deal, we thought of buying a mailbox to test how it works with TMail. All TMail needs is 1 mailbox only which cost around Rs.35 (less than 0.5 USD) per month.

It also has a limit of 5 domain alias which mean you can easily set up 6 domains forwarding for your TMail. The Rs.35 plan comes with 5GB of storage which is good enough to start with and later you can upgrade if required.

This idea is not limited to BigRock.in, however, we strongly recommend them because of the speed which they receive the message. Please note that time taken for email to receive is still depended on your email provider.

Go ahead and try this out!

You can create a ticket at https://support.thehp.in to get any help. However, to get the help you need an active support contract, so please renew if you need any help.

Cheers!

2. Getting a 500 Error? Here is what you can do.

If you are getting a 500 Server Error, then its very much possible that either your server is not meeting the TMail requirements OR there is some configuration issue. 

Below are the steps you can go through to check:

  1. Contact your hosting provider and ask if they have following extensions installed for you on your server:
    1. PHP >= 7.1.3 
    2. MySQL >= 5.1
    3. BCMath PHP Extension
    4. Ctype PHP Extension
    5. JSON PHP Extension
    6. Mbstring PHP Extension
    7. OpenSSL PHP Extension
    8. PDO PHP Extension
    9. Tokenizer PHP Extension
    10. XML PHP Extension
  2. Incase you are using TMail, then you will need below extensions as well:
    1. IMAP
    2. iconv
  3. Check out the logs located in storage -> logs -> (something).log and see if you can understand what the error is. This will most probably tell you what extensions are not installed properly. 


If your hosting provider comes back saying everything is installed as per the requirement and you are still getting error, check your IMAP email configuration. You can try below steps:

  1. Disable SSL for IMAP from Admin Panel
  2. Check with your hosting provider what is the hostname to connect (IMAP Hostname)

If none of the above solutions are working for you, please go ahead and create a ticket with all the details you have. Don't forget to keep the ticket private incase you have some sensitive information (like Passwords, etc).


3. TMail Installation Tutorial


PS - Make sure you turn on CC to get textual instructions. 

4. How to integrate WordPress Blogs?

From TMail v5.2 & tSMS v1.2, you can integrate your WordPress Blogs! You can either show blogs right on the homepage using the short-code OR you can create a new page and put the short-code to show the blogs.

 

Here is the short-code to show your WordPress Blogs on TMail: 

[blogs url="https://harshitpeer.com/blog"]

 

Below are all parameters details

url

URL of your WordPress Blog from which you want to show blog post

This is the only REQUIRED parameter. 

context Scope under which the request is made; determines fields present in response.

Default: view

One of: viewembededit

page Current page of the collection.

Default: 1

per_page Maximum number of items to be returned in result set.

Default: 10

search Limit results to those matching a string.
after Limit response to posts published after a given ISO8601 compliant date.
author Limit result set to posts assigned to specific authors.
author_exclude Ensure result set excludes posts assigned to specific authors.
before Limit response to posts published before a given ISO8601 compliant date.
exclude Ensure result set excludes specific IDs.
include Limit result set to specific IDs.
offset Offset the result set by a specific number of items.
order Order sort attribute ascending or descending.

Default: desc

One of: ascdesc

orderby Sort collection by object attribute.

Default: date

One of: authordateidincludemodifiedparentrelevancesluginclude_slugstitle

slug Limit result set to posts with one or more specific slugs.
status Limit result set to posts assigned one or more statuses.

Default: publish

categories Limit result set to all items that have the specified term assigned in the categories taxonomy.
categories_exclude Limit result set to all items except those that have the specified term assigned in the categories taxonomy.
tags Limit result set to all items that have the specified term assigned in the tags taxonomy.
tags_exclude Limit result set to all items except those that have the specified term assigned in the tags taxonomy.
sticky Limit result set to items that are sticky.

 

Note: TMail short-code uses WP JSON API for extracting blogs from your WordPress site.

5. How to add Favicon?

Upload your icon in public folder of your website and make sure you're able to access that favicon via https://yourwebsite/favicon.[png/jpg]

Once you see your favicon getting loaded in above URL, use below code and put that URL instead of [YOUR_FAVICON_URL] withj [EXT] as PNG or JPG depending upon extension of your image file.

<link rel="icon" href="[YOUR_FAVICON_URL]" type="image/[EXT]">

6. How to setup CRON to delete emails from server?

Its quite possible that your site becomes famous with TMail running at the backend, so here is a quick way on how you can delete tons of emails, you may be receiving daily. 


Below is the CRON command you can set

wget -O /dev/null -o /dev/null https://[YOUR_SITE_URL]/cron/deletemails?key=[CRON_PASSWORD]


You can set the time based on your need. Below is the description of various possible options

# * * * * *  command to execute 
# │ │ │ │ │ 
# │ │ │ │ │ 
# │ │ │ │ └───── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0) 
# │ │ │ └────────── month (1 - 12) 
# │ │ └─────────────── day of month (1 - 31) 
# │ └──────────────────── hour (0 - 23) 
# └───────────────────────── min (0 - 59)


Examples,

If you want to set the emails to be deleted every day, 

0 0 * * * wget -O /dev/null -o /dev/null https://[YOUR_SITE_URL]/cron/deletemails?key=[CRON_PASSWORD]


PS - You can find / set your CRON Password in Admin Panel of your TMail

7. Full Screen View on TMail

Lot of people requested for a full screen view just like TMail had before v5. So, now finally you can have that in new TMail as well. Below is something you can get from this


Below are the steps to achieve above design:

1. Create a new Page and name it anything you want

2. You don't have to write any content for this as that won't be displayed here

3. Copy paste below code in Custom Header field of the page

<style>
.tm-content {
  display: none !important;
}
.tm-sidebar {
  width: 100% !important;
  max-width: 100% !important;
  flex: 100 !important;
}
.tm-sidebar > .tm-create {
  margin: 0 auto !important;
  width: 400px !important;
  max-width: 80% !important;
}
header .tm-logo {
  padding-top: 1em !important;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99;
}
header .tm-menu {
  border: none !important;
}
header .tm-menu a {
  color: #fff !important;
}
header .tm-menu a:hover {
  color: #eee !important;
}
@media only screen and (max-width: 1200px) {
  body main .tm-sidebar .tm-create.show-button form,
  body main .tm-sidebar .tm-create.show-button span {
    display: block !important;
  }
  header .tm-logo {
    padding-top: 1.5em !important;
  }
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function(){
    document.getElementsByClassName('tm-menu')[0].style.backgroundColor = window.getComputedStyle(document.getElementsByClassName('tm-logo')[0], null).getPropertyValue("background-color")
});
</script>

4. Make this page, your homepage


That's it!

8. How to add more domains to TMail?

Here is a tutorial which shows how you can add more domains to TMail. Basic steps are as follows:

1. Add your new domain to cPanel (or any other panel) as Addon or Park / Alias Domain

2. Setup Default Address for that specific domain and forward all mails to same catchall id which you created while setting up TMail.

3. Add your new domain in TMail Admin Panel under Domains.

4. There is no step 4, that's it!

9. How to add more languages?

How to add more languages is one of the most requested tutorial. As both tSMS and TMail now share some backend structure, this tutorial will work for both.

So, let's get straight to the point. Follow below steps to add more languages OR if you want to update any language translations :

First step is to add a folder under

resource/lang

You will see few language folders which are already created. Go ahead and create a new folder you want. Keep the folder name short, lowercase and without spaces. We will need to specify this name in another file as well to make it come on the main website.

Copy the files from "en" folder to your new folder and now start editing the files in your new folder with your new language strings.

Once you are done, goto config/app.php file and scroll down till you find below line

'locales' => ['ar', 'de', 'en', 'fr', 'hi', 'pl', 'ru'],

Now, add your new folder name in that array. For example, if your folder name is uk-en then following will be the changed line

'locales' => ['ar', 'de', 'en', 'fr', 'hi', 'pl', 'ru', 'uk-en'],

That's it!

Goto your website and you will see your new language in the language selector dropdown on top right corner :)

10. How to add more ads directly inside files?

With v5.4, TMail has more ad spaces.

Below is a short preview of how many and where exactly are the Ad Spaces are located in TMail:

If you still wish to add more ads, you will need to edit following files based on where you want to add ads:


1. resources/views/layout.blade.php - Global Layout

2. resources/views/page.blade.php - Page Layout

3. resources/views/app.blade.php - App Layout


You will need to have basic knowledge of HTML / PHP to understand how to add the ads code.


However, at every update, you may need to do this again since you're editing the core files.



11. How to add Sitemap?

You can use this tool to generate sitemap https://www.xml-sitemaps.com/

Once you get the file, you can put the file in Root Folder (Ex. public_html) -> public