HTML Form to Mail | Contact form to email the fastest way | contact page with php mail

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone today i'm going to tell you how to connect your website contact phone into your email using psp after i'm making the television css video a few people ask me about how to connect the contact phone into their email and now i decided to make a video about it in this video we are going to create a custom contact form and an email function and test it on a live server basically the local development softwares doesn't support php mail function in your local computer we have to test it in live server environment here we are going to do that let's dim into the video before that if you are not subscribed to this channel please subscribe and like if you like this video if you have any doubts related to this video you can feel free to come in here you have to create a contact phone first we have to create our input fields we have to add a unique name for that now just create the email input and the type is email and name is email address address and and third one is message okay we just leave it as test type okay your message and we have to finally create a button submit button you can name you can name it whatever you want and open that in browser you can see your name your email address your message and submit okay now we made our contact form uh i didn't run any styling here because uh it's just a boilerplate to show you how it's work so so that's why i'm trying to keep it maximum simple now you have to create the function the php function create a new file called mail.psp and open the link in the description and get the code from my blog i already wrote a blog about the topic and i i create the code for easy reference and you can just copy and paste it into your mail.php file so you don't need to rewrite the codes and i will explain what will happen here i connect this form into this mail.php file like in the form action we have to connect the form into mail.php for that we have to obtain the form action to mail.php okay now when someone fills the form and click submit then the data will transfer into mail.php and you can here you can see here you can see we have three fields name email and message okay the name value will transfer to this mail.php file and store it into this variable also the email and the message email will be stored into this variable and message here okay i think you got my point if you have another field like mobile number i create the field mumbai mobile mobile number and we have to store and do another variable called mobile or number whatever you want and ascend the field name field name this is the feeling field name into the first so now this data will be stored on this variable you got my point now you have to enter our email address here i'm using my personal email address and you can add a subject like mail from website or code cornea whatever you want and this is the message body so here you can see the name equal to name i mean what whatever the use whatever the customer under us name in the field and email as email and messages message so we have to add our next one i mean the mobile number uh this slash r slash n means it's a break it's a line break in php so if you have if you need to add the number field you have to add a dot then in double quotes you had to break the line you had to enter like mobile number close the double curt and space we have to assign the variable as value here okay that means name equal to the name which the customer index and nasty line and email equal to the email message equal to message nest line mobile number equal to number here you can enter the from email address if you want to send a carbon copy of this email you can enter the email address here or leave it as blank no issue and if the email address is not equal to null if this contain any value we will send you the details into your email address after that it will read out to thank you.html okay now we have to create a page called thank you okay everything done now you have to test it if you want to test the email functionality normally our local environments doesn't support that so we have to push our code into the live server i log into my cpanel and i just need to upload these three files contact.html mail.php and thank you.html now it's here i had to open in browser here i can see those files oh i forgot something in this email field we named us email address and in here we just named it to email we have to name it thus email address and save to the form and click submit okay now you have to check our email here we have our new message now reply mail from corconia test trusted.com test message and all details here i think now you got an idea how we can connect your contact form into your website if you have any doubts you can drop a comment here you
Info
Channel: Ajith Jojo
Views: 65,898
Rating: undefined out of 5
Keywords: HTML Form to Mail, contact page html css, php mail function, contact page with php mail., Contact form to email the fastest way, html contact form to send email, contact form php send email, html form to mail, phpmailer contact form, php mailer, php contact form, php contact form to gmail, html form to email
Id: 6QkgXcRMTq0
Channel Id: undefined
Length: 10min 42sec (642 seconds)
Published: Tue Jan 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.