+3

How to add 'send message' box in my website like this website.

Actually i know how to design this message box but I want to know it's back-end how this actually works.does our message go directly in their email box our in something else. Like this website.Message box is present at the bottom. https://ankittiwari.com

12/2/2019 12:35:54 PM

Maninder $ingh

10 Answers

New Answer

+5

Maninder $ingh Is your website for your clients or it is just a contact us form? See if it just a contact form then no need of database. People will just enter their mobile number, email, subject and message nothing else.

+4

🅰🅹 - ɪ'ᴍ ᴄʀɪᴍɪɴᴀʟʟʏ ɢᴏᴏᴅ! I like your idea you are right.thanks for your answer.

+4

🅰🅹 - ɪ'ᴍ ᴄʀɪᴍɪɴᴀʟʟʏ ɢᴏᴏᴅ! My idea is that first of all I will create a new gmail account e.g mywebsite@gmail.com and when user send me message throw html form and submit to server then I will store the user message in database and then I will email with mywebsite@gmail.com and message will be which already store in the database to my main email account with the help of script which will be run in server side.It means the user who wants to send me messages they don't need to put their email and it's password in html form just need message.

+3

Maninder $ingh Check this Example with gmail SMTP. Here login credentials can be of anyone. Go through this code then you can understand how it works. https://pepipost.com/tutorials/send-email-in-java-using-gmail-smtp/

+3

🅰🅹 - ɪ'ᴍ ᴄʀɪᴍɪɴᴀʟʟʏ ɢᴏᴏᴅ! You are right it's just contact us form but server side script is require so that I can get users message in my email.

+3

Maninder $ingh I shared a link. Go through that. There step by step procedure has been given. In the above link with maven project given but you can simply write a Servlets class. You can do with PHP also. PHP would be good solution.

+2

You can also store some information in databases and send mail after storing data. But if your website doesn't have any dynamic things means pure static website then no need to store in database. You can directly send mail.

+2

🅰🅹 - ɪ'ᴍ ᴄʀɪᴍɪɴᴀʟʟʏ ɢᴏᴏᴅ! Actually i know that how this back-end working in this technique.Mainly am confuse in that how user can send me message without filling their password of their email and your answer help me actually they store the information or you can say the message of user in database then send the information in destination email account with their own email account.means website need only information not user email.

+1

Maninder $ingh mail services already store data in their databases so why we would like to store in our database.

+1

Maninder $ingh To send mail no need the login of sender. We send mail through 3rd party login authentication in back-end Because mail services need just valid login to send mail. That 3rd party login credentials May be your or maybe mine or maybe other user. Let me share one example with you.