And I don't know how this post helps...because I am just providing you the code...
Try coding yourself and refer my code if you want to. And if you are learning from my code (I know it's rare, still), please be sure about knowing the concept before checking my code, and I hope it's not too tough to understand.
and choose your Linux distribution. I chose " Linux (All 64 bit variants) " since I have Ubuntu 64 bit. After downloading, you should have a .tar.gz file , place it in your home folder and extract it by right clicking it. It should give you a folder named "mtemp" and if you don't have any extracting application, then open your terminal and type this
replacing surgemail_XYZ_linux with whatever your file is named. Like, my file is named as surgemail_70c2_linux.tar.gz , so i used this command :
Now you should have a folder named "mtemp". Now use the terminal and change the directory to this folder using 'cd' command. And now, type
With this, your installation should start. Press Enter when it asks if it's ok to install in the default the installation path.
Now, type "karupsmail.com" as the full domain name. And type the host name as "mail.karupsmail.com" and then username for web administration as "root" and password as "root" too, and retype it.
Now, it asks for email account for management emails and alerts, and tells the default is "root@karupsmail.com" and now, just press enter.
Now, you will see a web page with many options and buttons. Some of the options that we need are gonna be discusses below. One of them is "Create User Account".
Just click this button and you will be asked the details of the new user. Just type the username and password. And create two users, so that, later, you can use one to send and another to receive.
I have created users : "karuppiah" and "keshav" , with password as their username. So now, their email ids will be "karuppiah@karupsmail.com" and "keshav@karupsmail.com"
Now, you just have to click "Manager Info" on top left and then click "Web Email Client" and then login to your email accounts to see a GUI interface.
But we have to write java code to actually send mails using code and not using these GUI stuff.
Here's a basic code for Sending and Receiving Text Mail for my mail server :
You can change the code according to your own surgemail configuration ! :)
And finally, you need two jar files : mail.jar and activation.jar which contain the packages which start with the name : javax.mail.x and javax.activation.y
I am showing the procedure using Ubuntu. And don't worry, installation procedure won't change for different Linux distributions. I am just mentioning that I am using Ubuntu.
Installing Tomcat Server :
Follow these steps with some slight modifications that I am mentioning:
First of all, Mam was telling that there are some problems in installing tomcat using apt-get command, I suppose some packages will be missed. Not sure. So, I downloaded the tar file from the url :
Now, follow the steps in the Digital Ocean website from the "untar file" step using "tar" command. And where ever they say "~/path/to/tomcat" use "/opt/tomcat"
After following all the steps, you should have all the files of tomcat in your /opt folder.