Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8083913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:37:48+00:00 2026-06-05T17:37:48+00:00

I have file with name contact.php, inside I have form: <form method=post name=kontakt action=send_mail.php>

  • 0

I have file with name contact.php, inside I have form:

<form method="post" name="kontakt" action="send_mail.php">
  <fieldset class="formularz_kontaktowy">
    <legend>Formularz kontaktowy</legend>
    <div><label id="lblStatus"></label></div>
    <div><input type="text" name="txtName" title="Imię i nazwisko" id="txtName" class="text"></div>
    <div><input type="text" name="txtEmail" title="Email" id="txtEmail" class="text"></div>
    <div><input type="text" name="txtTitle" title="Tytuł" id="txtTitle" class="text"></div>
    <div><textarea cols="30" rows="10" name="txtMessage" id="txtMessage" class="text" title="Treść wiadomości"></textarea></div>
    <input type="submit" name="btnSendmail" value=Send">
  </fieldset>
</form>

send_mail.php

<?php
  require_once "Mail.php";

    $from = "<mailaddress@gmail.com>";
    $to = "<mail2@gmail.com>";
    $subject = "Hi!";
    $body = "Hi,\n\nHow are you?";

    $host = "ssl://smtp.gmail.com";
    $port = "465";
    $username = "<mailaddress@gmail.com>";
    $password = "password";

    $headers = array ('From' => $from,
      'To' => $to,
      'Subject' => $subject);
    $smtp = Mail::factory('smtp',
      array ('host' => $host,
        'port' => $port,
        'auth' => true,
        'username' => $username,
        'password' => $password));

    $mail = $smtp->send($to, $headers, $body);

    if (PEAR::isError($mail)) {
      echo("<p>" . $mail->getMessage() . "</p>");
     } else {
      echo("<p>Message successfully sent!</p>");
     }

?>  

after click btnSendmail in browser I have URL, for example: localhost/contact.php?txtName=Mary+Smith&txtEmail=mailMail%40gmail.com&txtTitle=dfd&txtMessage=fgdf&btnSendmail=Send, but mail doesn’y sent and I have not message. Why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:37:50+00:00Added an answer on June 5, 2026 at 5:37 pm

    I found problem. I had two tags , one in template and second, nested in contact.php. Thanks a lot for help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a contact form in my flash file with name/email/message fields which a
I've got a basic PHP contact form and have it process.php file that checks
For example I have a file name call A.java. Here its structure: public class
I have this method for grabbing the file name from a string URI. What
I have a contact form, the values of which I'm passing to a php
I have a contact form that is being submitted, I have PHP validation all
Hey all, I have a basic HTML contact form that goes to a .php
Ok, i have made a contact form. i need a php script to email
I have a job application form where people fill in their name and contact
I have a file name logspath.txt which contain on the logs directory path on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.