Create A Contact Form with PHP That Can Actually Send Mails!

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 134

  • @2fpchuck
    @2fpchuck 2 года назад +11

    Concepts, code, and execution were easy thanks to this tutorial! YOU ARE THE BEST MAN!

    • @cptobv
      @cptobv Год назад +1

      Indian accent

  • @awaznipi2709
    @awaznipi2709 Год назад +2

    No Server config, SMTP ect, No phpmail and it's just this simple?. i cant believe i had spend days trying to configure phpmail, to no avail. thanks a million.

  • @pureart94
    @pureart94 2 года назад +2

    Thanks for your Help!! I have seen so many Videos that couldnt help me out. But your way works fine and simple! THX!!!

  • @RobertVeale
    @RobertVeale 5 месяцев назад

    I too have been fighting to find a way to send mail through my site. It's been hours of searching over many days but now that search is over. Your video was great and got me finally up and running. THANK YOU!!

  • @dpcare1499
    @dpcare1499 10 месяцев назад +2

    Excellent tutorial with speak is fine. Thanks from bottom of my heart.

  • @yazilimci_adam
    @yazilimci_adam Год назад +2

    A clean and cool tutorial !

  • @frodion
    @frodion 7 месяцев назад

    Best tutorial for this topic. Thank you very much!

  • @erikdinos1229
    @erikdinos1229 2 года назад +1

    thank you for this tutorial! worked like charm!

  • @frankgp.python-php
    @frankgp.python-php Год назад +1

    excellent tutorial, it helped me to make my first contact form ✌

  • @beatriz1598
    @beatriz1598 2 года назад +2

    not every hero wears cape THANK YOU

  • @tomar666
    @tomar666 2 года назад +3

    That's exactly what I was looking for!!! Thank you so much!! Awesom stuff. Super simple :)

  • @skisenvient
    @skisenvient Год назад +1

    Great tutorial. Thank you!

  • @Miles09
    @Miles09 2 года назад +1

    Very informative video. Thanks for the content.

  • @diogofrazao4919
    @diogofrazao4919 2 года назад +1

    thanks man you helped me a lot. You're a chad

  • @kalinsexplores5883
    @kalinsexplores5883 2 года назад +1

    Thanks buddy! I've done it!

  • @kelxdlol
    @kelxdlol 2 года назад +1

    Thank you so much!!! It is working all good on my website!!!!!!

  • @KeffelewAssefa
    @KeffelewAssefa 2 года назад +4

    Thank you, what type of setting do you use for your VS code?

  • @toma1610
    @toma1610 2 года назад +2

    About inserting more inputs. I am developing a Thank You page like yours, but adding an ARRAY. For example:
    “Thank You, $name for contacting us. We will write you back to $email. Your selected options are: $array_with_selected_or_checked_options.
    I would like that array to be showed separated by comas. I checked something about the IMPLODE function, but how do I do to pack the array with the selected options in one variable and insert it everywhere? Are you in Stackoverflow?

  • @myllerolivio9699
    @myllerolivio9699 3 года назад +4

    Very good video and explation. Now, if I have an existing website with many folders in my root directory, where or which folder do I upload my files to? Can you shed some light? Thanks

    • @MrCoderYt
      @MrCoderYt  3 года назад +1

      It doesn't matter. Just make sure that the path of the file is right.

  • @malcflodailyinspiration4379
    @malcflodailyinspiration4379 2 года назад

    Thanks, it worked fine!👍🙂

  • @smjanet
    @smjanet 2 года назад +2

    Thanks for the video.
    Pls do I need to upload my project to live server for this code to work? Or can it work locally using xamp server ?

  • @hassanabu2750
    @hassanabu2750 2 года назад +6

    This is a really good tutorial, thank you. I am having a problem though. I get an error every time I try sending my form. Can you help please?

    • @frankgp.python-php
      @frankgp.python-php Год назад

      in the mailheader you have to put the email of your web domain

  • @adtoolsconcepts939
    @adtoolsconcepts939 Месяц назад

    Actually, I have tried everything including following step by step and replicating it on my Forms, but they do NOT submit. No action happens to the beautiful form. I need help!

  • @esasrl3384
    @esasrl3384 Год назад

    Great tutorial! One of the best on the subject. Can i please ask you, if i want to have a modal (popup) message once the email is sent how do i link the script? Instead of how you did with another thank you page with a return to homepage link? Thank you for your answer.

  • @chome4
    @chome4 2 года назад

    Works well. How can I add a list of checkboxes so the email contians a list of items I check?

  • @albedesigns
    @albedesigns 7 месяцев назад

    Thanks for the video.. I'm such a noob when it comes to back end lol the font in your IDE is a bit hard to read for me though.

  • @jcoff1000
    @jcoff1000 2 года назад

    Love the help and video. I was trying to add more fields and I cant get it to work. I need 3 more fields and 2 need to be check boxes.

  • @wolfenrico
    @wolfenrico Год назад +1

    Thank you for your Tut. It is great! I'd like to add some more input fields, like fon number or date in the form. How can I change the php file to send this information with the email. I'd try to do this (mail($recipient, $tel, $subject, $terminwunsch, $message, $mailheader) or die("Error!");), but it does not work. Can you help me?

    • @skonfoot4066
      @skonfoot4066 Год назад

      me too , find you a solution ?

    • @wolfenrico
      @wolfenrico 11 месяцев назад

      No!@@skonfoot4066

  • @lokesh31286
    @lokesh31286 Год назад

    Can you please provide the video for attaching a file to mail with same contact form

  • @musiqbanktv7001
    @musiqbanktv7001 Год назад +1

    ❤thank u boss

  • @wie.funktioniert
    @wie.funktioniert 10 месяцев назад

    Please show at the beginning what the end product will be so we know if it is the right thing for us.

  • @erikdinos1229
    @erikdinos1229 2 года назад +1

    hello all...is there any way, to add one more field? i want to get the sender's phone number too,in the emails that i receive? tried some things, but no luck!

  • @ÂngelaGarcia-y2y
    @ÂngelaGarcia-y2y 4 месяца назад

    Hi, i did all like u did but show me error can u help me, this just work if i public?

  • @toma1610
    @toma1610 2 года назад +1

    Here, you didn‘t use isset function. It was not necessary. So, when should we use it?
    if isset $_POST [ ' submit ' ]; etecetera...

    • @frankgp.python-php
      @frankgp.python-php Год назад

      The isset function is used to check if it is null or not.

  • @silviudragan8511
    @silviudragan8511 3 года назад

    is very useful vide,works on mobile and pc. But if the one who fills in the form enters a yahoo mail address no longer receive his answer on gmail . The form works only if he introuduces a gmail address. Can you help us?

  • @dr.surendrashah
    @dr.surendrashah 2 года назад

    I make three files and copy paste all codes of yours and change email address to mine in PHP file, uploaded. However when I check and fill the form and sent. it shows sent confirmation message. However email was not received in inbox or junk folder. Do I need to make some setting in cpanel setting?

  • @aauniversal4122
    @aauniversal4122 Год назад

    i have a website through which i send a mail to the user. the email address through which i am sending the email i want to change this email

  • @salaheddine9251
    @salaheddine9251 2 года назад +1

    Hi, after I click the “send” button it leads me to a page with only the php code and not the html.index

    • @salaheddine9251
      @salaheddine9251 2 года назад

      Or does it only work when the website is online

    • @YemeniTechnician
      @YemeniTechnician 2 года назад

      Me too, I am online and when I click Send it leads me to php code

    • @salaheddine9251
      @salaheddine9251 2 года назад +1

      @@YemeniTechnician I think I figured it out, php only works when it’s online

  • @shushurel
    @shushurel Год назад +1

    It's working but didn't receive any email on the receiver(email inbox or spam)

    • @mingming4186
      @mingming4186 6 месяцев назад

      I have the same problem here as well. Wonder why it's not working.

  • @lorenzociniglio3591
    @lorenzociniglio3591 2 года назад

    Works for me. Except sometimes emails wind up in my junk mail folder

  • @reallifepubg00039nav
    @reallifepubg00039nav Год назад

    Bro osm🎉

  • @raqueliatheimpatientgardne8196
    @raqueliatheimpatientgardne8196 2 года назад

    Oh never mind I figured it out. Gmail will not allow it for some reason and in protonmail it is going into the SPAM folder! Why? I don't have the slightest idea, thoughts?

  • @kalilfagundes7431
    @kalilfagundes7431 10 месяцев назад +1

    Thanks!

  • @thinusvanstaden6743
    @thinusvanstaden6743 Месяц назад

    is there a way to prevent it from going to spam?

  • @DetectiveSquarepants
    @DetectiveSquarepants Год назад

    I get a 405 error even after using the same code and steps. Any thoughts?

  • @MohamedArafathCanada
    @MohamedArafathCanada 9 месяцев назад

    Sir can you do a video how to send mail using only xampp with Gmail smtp

  • @helaolange
    @helaolange 2 года назад

    Which server are you using

  • @d1hoops975
    @d1hoops975 3 года назад

    will it work with next js?

  • @TheWorldofKalki
    @TheWorldofKalki Год назад

    Not working in hostgator hosting

  • @krishnasingh-ek1ix
    @krishnasingh-ek1ix 2 года назад

    thank a lot brother

  • @DeepSingh-of7dl
    @DeepSingh-of7dl Год назад

    how can i upload in xampp server?

  • @anton3997
    @anton3997 2 года назад +1

    Thankyou 10000000000000000000000❤️

  • @jamescarltamayo943
    @jamescarltamayo943 2 года назад

    Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\phpchurch\send-message.php on line 22
    Error!
    How to fix this? :(

    • @vedamanichilukuri1399
      @vedamanichilukuri1399 2 года назад

      HEY even i too got same error.. have u resolved it?

    • @tintin8186
      @tintin8186 2 года назад

      same problem I encounter

    • @teamtmc7384
      @teamtmc7384 2 года назад

      @@tintin8186 u have to upload it

    • @mewandhue
      @mewandhue 2 года назад

      I have the same problem 😕

    • @teamtmc7384
      @teamtmc7384 Год назад

      @@PDP777PT i mean you have to host it , offline by xampp or pay it

  • @oytunilgar715
    @oytunilgar715 2 года назад

    When i write $mailheader="From" . $name "

    • @bbyfeather
      @bbyfeather Год назад

      Think you are missing a dot between $name and "

  • @raqueliatheimpatientgardne8196
    @raqueliatheimpatientgardne8196 2 года назад +1

    Hi there,
    I am having an issue with something that I cannot figure out. I have used all your code but am working with a one page website that has the contact form at the bottom of the index.html. After putting it all together and filling out the contact form from my site it does say that the message was sent but I never get the messages. I think it might have something to do with Hostgator and where the file is located and was wondering if you could direct me to the correct place to upload my files? I have sub domains under my main domain as I have the baby package and do I need to put these files in the zip folder into the public_html folder and then extract them there? If so then how will the sub domain of my website access these files? or is it because I am using a one page website? It's very confusing on Hostgators end because they cannot help me, I have tried to call them twice and both times they hung up on me. I had even tried to forward my email from Hostgator but that didn't work either. I have gmail and protonmail and neither email gets the message so it has to be something on the server side.
    Please help:>}

    • @joy-ov7nj
      @joy-ov7nj 2 года назад +1

      If you're hosting your site on vs code using the live server extension the POST method does not work. Once you upload your site to a web host provider such as godaddy and they allow emails to be sent through their service it works perfectly

  • @alltypevideobyakash1572
    @alltypevideobyakash1572 3 года назад

    It's also work mobile device? because some php use conract from work pc but not work mobile device . plz tell me plz please

    • @MrCoderYt
      @MrCoderYt  3 года назад +1

      Yes. It works perfectly fine. I have checked with mobile devices also.

  • @IslamAudioStation
    @IslamAudioStation 2 года назад

    great tutorial sir, for some reason the email lands in the junk folder unfortunately. still thank you very much.

  • @sureshmane233
    @sureshmane233 Год назад

    i want contact form with file upload to email

  • @thoufeequeahmed.j3659
    @thoufeequeahmed.j3659 3 года назад +1

    i get error 405 method not allowed how to fix

    • @joy-ov7nj
      @joy-ov7nj 2 года назад +1

      If you're hosting your site on vs code using the live server extension the POST method does not work. Once you upload your site to a web host provider such as godaddy and they allow emails to be sent through their service it works perfectly

  • @PoshYoshii62
    @PoshYoshii62 2 года назад +1

    why is this downloading the php file on submission

  • @djonsmith4345
    @djonsmith4345 Год назад

    Thank you for the tutorial but it is not working. It is giving die Error! message. I uploaded the same github code into server. Please check.
    Thanks in advance

    • @frankgp.python-php
      @frankgp.python-php Год назад

      in the mailheader you have to put the email of your web domain

  • @velrajavelraja7663
    @velrajavelraja7663 2 года назад +1

    showing error

  • @saifghanmi9322
    @saifghanmi9322 2 года назад +1

    THANKSSS

  • @bkentertainment6402
    @bkentertainment6402 2 года назад

    I did everything you did. I uploaded it to my own server, but I did not receive any mail in my mailbox. (I know it will come to your spam box)

    • @frankgp.python-php
      @frankgp.python-php Год назад

      in the mailheader you have to put the email of your web domain

    • @bkentertainment6402
      @bkentertainment6402 Год назад

      @@frankgp.python-php I tried both but it didn't work. Do you have a pre-made code file that you can share with me?

  • @hybrid_twinx
    @hybrid_twinx 2 года назад

    Hi, I don't receive any email..

    • @MrCoderYt
      @MrCoderYt  2 года назад

      Check your spam folder please.

  • @awaznipi2709
    @awaznipi2709 Год назад

    Attachment 📎 please 😢

  • @gchatterjee7012
    @gchatterjee7012 2 года назад

    Html form action php code not sending form details to mail inbox. Your immediate response is highly appreciated. infinity free host.

  • @kaweeshaavindu1409
    @kaweeshaavindu1409 Год назад

    how to create account in cpanel

  • @muhammadjunaidraza2246
    @muhammadjunaidraza2246 2 года назад

    hey Email is sending but data not receive

    • @muhammadjunaidraza2246
      @muhammadjunaidraza2246 2 года назад

      can you help me

    • @MrCoderYt
      @MrCoderYt  2 года назад

      @@muhammadjunaidraza2246 Please download the source code from the github repo. The link is in the description. Then at mail.php change the recipient email address to your email address. You will receive the email. If you cant see it in the main inbox, check your spam folder.

  • @terojsevi8090
    @terojsevi8090 2 года назад +1

    Warning: Failed to connect the mail server, verfy SMTP

  • @techwithgimhan1743
    @techwithgimhan1743 2 года назад +1

    thanks

  • @thegoat2936
    @thegoat2936 2 года назад

    How to install cpanel ??

  • @haigoto46
    @haigoto46 3 года назад

    Hi, How to add CAPTCHA?

    • @MrCoderYt
      @MrCoderYt  3 года назад +1

      Hopefully this will help: www.w3school.info/2016/07/28/create-own-captcha-for-your-website/
      I will create a video on that in future.

  • @umangpathakp
    @umangpathakp 2 года назад

    i am getting 405 erro after clicking send

  • @dosisinternetharian
    @dosisinternetharian 2 года назад

    i cant use cpanel, how to do that?

  • @rrrrrrr202
    @rrrrrrr202 Год назад

    Hi is it safe? from hacking? Thanks alot

  • @abbaswebguru3352
    @abbaswebguru3352 2 года назад

    spam solution?

  • @MiraculousLadybugPhilippines
    @MiraculousLadybugPhilippines 3 года назад

    not receiving a email

    • @joy-ov7nj
      @joy-ov7nj 2 года назад

      If you're hosting your site on vs code using the live server extension the POST method does not work. Once you upload your site to a web host provider such as godaddy and they allow emails to be sent through their service it works perfectly

  • @azamwahid
    @azamwahid 2 года назад

    where to add password ?

  • @photon_effect4341
    @photon_effect4341 Год назад

    hey your code didn't your it is throwing out this error:
    Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\my document\contact.php on line 11
    Error

  • @massphers
    @massphers 2 года назад

    02:21 Ass son😂😂😂

  • @shyamsundersingh9115
    @shyamsundersingh9115 3 года назад +1

    Its not working on server

    • @oscarmartinlive
      @oscarmartinlive 3 года назад +1

      I get an Error

    • @joy-ov7nj
      @joy-ov7nj 2 года назад

      If you're hosting your site on vs code using the live server extension the POST method does not work. Once you upload your site to a web host provider such as godaddy and they allow emails to be sent through their service it works perfectly

  • @ohid2010
    @ohid2010 Год назад

    it's not working

    • @frankgp.python-php
      @frankgp.python-php Год назад

      works correctly!

    • @ohid2010
      @ohid2010 Год назад +1

      I downloaded the code from git and hosted it on my live server but it did not work. can you provide me your live server link and source code that working properly?

    • @frankgp.python-php
      @frankgp.python-php Год назад

      @@ohid2010 you have to change the sender, it is the fourth parameter, I have a tutorial that you can see to understand it better ruclips.net/video/IO9vSm-a918/видео.html

  • @sneakycheeky531
    @sneakycheeky531 Год назад

    only sends like once

    • @frankgp.python-php
      @frankgp.python-php Год назад

      you can duplicate the function or create a loop

    • @sneakycheeky531
      @sneakycheeky531 Год назад

      THNKS but i resolved it

    • @Indra0T
      @Indra0T 11 месяцев назад

      @@sneakycheeky531how you did it please?

  • @ElEcodelTren
    @ElEcodelTren Год назад +1

    all of this is useless if it doesn't have a mail validation code

    • @onwuekwemiracle6906
      @onwuekwemiracle6906 Год назад

      How?

    • @ElEcodelTren
      @ElEcodelTren Год назад

      @@onwuekwemiracle6906 i dont remember exactly why i was needing it for... but i think certain plugins or certains thins like google ad sense or i dont remember which one asks you some layers of security as the validations of the sender email, if it doesnt have it your site could be easly massively spammed with trash mails

  • @valzu3921
    @valzu3921 2 года назад +1

    This is worthless because mail goes to spam folder

  • @akuarifin
    @akuarifin 2 года назад

    not working in email googlesuite/googleworkspace :( help me brother