TMail - Multi Domain Temporary Email System

Contents

1. Receive emails FASTER!

2. Getting a 500 Error or "Something went wrong"? Here is what you can do.

3. TMail Installation Tutorial

4. How to add 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 HTML Code?

11. How to change Font?

12. CloudFlare 524 Error

13. How to add Page in TMail?

14. How to add Sitemap?

15. I receive 20K emails every day, is it normal?

16. How to add a single-line Footer?

17. How to add Social Media Properties?

18. Not receiving emails after recent update?

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 or "Something went wrong"? Here is what you can do.

If you are getting a 500 Server Error or "Oops... Something went wrong", 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 add WordPress Blogs?

From TMail v5.2, tSMS v1.2 & Global DNS PHP v1.3, 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: This 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?

Note: Automatic Delete is disabled from TMail 6 just as a performance booster. CRON setup is mandatory if you want to delete old emails.

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 for 

TMail 5

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


TMail 6 - Will follow your Delete Settings in Admin Panel

wget -O /dev/null -o /dev/null https://[YOUR_SITE_URL]/api/cron/[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 the 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 HTML Code?

You may want to add some HTML code as well, so here is how you can do it.

Just add a start tag [html] and end tag [/html] before and after your HTML code respectively. So, if you want to add

<a href="https://google.com">hello</a>

then change it to something like below

[html]<a href="https://google.com">hello</a>[/html]



11. How to change Font?

You can use custom fonts like Google Fonts. To use any of the google fonts, follow the below tutorial.

1. Go to fonts.google.com and select the font you like to use.

2. Select the fonts that you want to add

3. Copy the shown code

4. Now go to TMail's Admin Panel -> Settings and scroll down to the Advanced section where you can see "Global Header" and paste the code.

5. Now, go back to fonts.google.com and copy the CSS code and match it to the following pattern.

<style>
*:not(i) {
    font-family: 'Castoro', serif !important;
}
</style>

and paste it into Global Header after the first code.


12. CloudFlare 524 Error

Since you're on this page, it looks like either you're just browsing through our articles or frustrated with the CloudFlare error on TMail. Don't worry, we got a solution for you and it's way simpler that you can think.


Reason why you face this error is when you put your website address as the IMAP host, your server has to route the IMAP request through CloudFlare for no reason. CloudFlare is technology which should be used between your end-user and your server, but using IMAP host as your website address, does something like this: Server -> CloudFlare -> Server

This is absolutely unnecessary. 


There is a very simple fix for this, just replace the IMAP host with your actual server hostname. In case if you're not sure what is your server hostname, just ask your hosting provider, they will easily help you out.


That's it! Problem solved!


In rare case, if you're still having trouble, simply created a ticket and our agents will get back to you ASAP!

13. How to add Page in TMail?

You can add multiple pages and link them to your main website in TMail. To add a page follow below steps:

1. Login to Admin Panel at https://yourwebsite/login

2. After login click on "Pages" in the top menu.

3. Here you will see all your existing pages and a new section called "Add New Page".

4. Fill out all the required details and hit "Submit".


Now, when you visit the URL on which you just created the page, you will see the page content.

14. 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

15. I receive 20K emails every day, is it normal?

This was a fantastic question asked by one of our customers and we thought it could be a question with many other customers as well.

Such a high number of receiving emails may be normal if you've that many users active on your site. Usually, after your end-user creates an email ID, most probably they will never use it again in future and forgets about it, as they only need it for a temporary purpose. But the services (like Facebook) where they've used the email ID still remembers the ID and sends email regularly. So, you end-up receiving tons of emails that are not being checked by anyone. Out of those 20K emails, maybe only 1K are the ones that users are checking. You can also confirm this by logging into your email account via Webmail and see the number of unread emails.

Ideally, you should keep changing the domains in your TMail everything 6 to 8 months or maybe sooner if you're very popular among those top Temporary Email solutions. And if you do this, all the old emails are automatically discarded and you start with a clean slate.

16. How to add a single-line Footer?

Many users have asked to add a footer, so till we work on a permanent and robust solution for this, below is a quick and easy way to add a single-line footer to your site.


NOTE - This is only for the "default" theme on TMail.


Add the following code in Custom JS in Admin Panel and make sure you edit line 3 with your text.

let content = document.querySelector('.default-theme')
let footer = document.createElement('footer')
footer.innerHTML = 'Copyright © 2020 - TMail'
content.appendChild(footer)


Add following code in Custom CSS in Admin Panel

footer {
     background: #111;
     color: #fff;
     padding: 10px;
     text-align: center;
}



17. How to add Social Media Properties?

With TMail6, you can add multiple Social Media Properties. Just follow below steps to add those.

1. Log in to Admin Panel and go to "Settings" Page

2. Scroll down, till you find  "Socials"

3. Click on "Add" 

4. In the "Icon" field add a font-awesome 5 based value, eg for Facebook, you can add "fab fa-facebook" and then add your URL in the "Link" field


You can get the list of all the icons here - https://fontawesome.com/icons?m=free



18. Not receiving emails after recent update?

We've received few complaints from a customer where they're not able to receive emails on TMail, however, the emails do exist in Catch-All Email Account. 

If you're also not receiving emails, please apply this patch - http://s000.tinyupload.com/index.php?file_id=99937255986594359335


To apply the above patch in the ZIP file, go to Admin Panel -> Update -> Manual Update and upload the ZIP file.