Skip to main content
Known Participant
March 11, 2025
Answered

Contact form and pdf download

  • March 11, 2025
  • 2 replies
  • 615 views

Hi. I have built and new website using a ThemeForest template.

 

However, I can't get the pdf download working for my CV despite putting it on the HTML.

I also can't find where in the code (phpmailer) I put my email address so people can conact me.

 

    Correct answer Ben M

    Please make sure not to post any personal or sensitive information in your post.

     

    As already stated your resume/cv is leading to a 404 meaning the page is not found. Please ensure the path is correct as currently it is linking to your root folder. If the resume/cv is in a subfolder the link needs to be updated.

     

    When I test your form, I am getting an error on the page stating that the phpmail function cannot be initiated. This is something you would need to discuss with your host as it appears they are blocking the script from working. If they are preventing a mail function on the form you may need to look to external providers like Typeform to collect information and send you responses.

    2 replies

    BenPleysier
    Community Expert
    Community Expert
    March 11, 2025
    quote

    I can't get the pdf download working for my CV despite putting it on the HTML.


    By @default7nqh1e6u4o3l

     

    This tells me that the file cannot be found in the root directory of your site:

     

    quote

    I also can't find where in the code (phpmailer) I put my email address so people can conact me.


    By @default7nqh1e6u4o3l

     

    This line of code shows that the action script can be found in a folder called "php" and is named "mail.php"

    <form id="contact-form" class="form-border" action="php/mail.php" method="post">

    Please show the code contained within this file so that we know what is going on. Make sure not to show passwords or any other private info.

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Known Participant
    March 11, 2025

     

    This is the code in the mail.php

     

    use PHPMailer\PHPMailer\PHPMailer;
    use PHPMailer\PHPMailer\Exception;

    require './phpmailer/src/Exception.php';
    require './phpmailer/src/PHPMailer.php';
    require './phpmailer/src/SMTP.php';


    /* --------------------------------------------
    // Receiver's Email
    --------------------------------------------- */

    $toEmail = "tokenemail@gmail.com"; // Replace Your Email


    /* --------------------------------------------
    // Sender's Email
    --------------------------------------------- */

    $fromEmail = "no-reply@website.com"; // Replace Company's Email Address (preferably currently used Domain Name)
    $fromName = "Company Name"; // Replace Company Name

    Ben MCommunity ExpertCorrect answer
    Community Expert
    March 11, 2025

    Please make sure not to post any personal or sensitive information in your post.

     

    As already stated your resume/cv is leading to a 404 meaning the page is not found. Please ensure the path is correct as currently it is linking to your root folder. If the resume/cv is in a subfolder the link needs to be updated.

     

    When I test your form, I am getting an error on the page stating that the phpmail function cannot be initiated. This is something you would need to discuss with your host as it appears they are blocking the script from working. If they are preventing a mail function on the form you may need to look to external providers like Typeform to collect information and send you responses.

    Known Participant
    March 11, 2025

    Apologies, url was missed. I have reposted this above with url added. https://kylehawkinscreative.com/

    Known Participant
    March 11, 2025

    I'm not sure why the file cannot be found on the root directory as it is defintiely there and the download link is correct?

     

    <p class="text-center mt-5 wow fadeInUp"><a href="https://kylehawkinscreative.com/KyleHawkins.pdf" class="btn btn-outline-dark shadow-none rounded-0">Download CV</a></p>
    </div>
    </section>

    Nancy OShea
    Community Expert
    Community Expert
    March 11, 2025

    Linux servers are cAsE sEnSiTiVe.  Best practice is to use all lowercase folder & file names, without spaces or other special characters.

    https://kylehawkinscreative.com/images/projects/kylehawkins_cv.pdf

     

    Hope that helps.

     

    Nancy O'Shea— Product User & Community Expert