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 9127729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:21:02+00:00 2026-06-17T07:21:02+00:00

Hi I am trying to send an email after a user enter some contact

  • 0

Hi I am trying to send an email after a user enter some contact data but it seems that the email does not get sent as expected.I do not work with php very often so I might have missed something.Here is my code:

function sendEmail($data){
      $to      = 'alexandru.nistor.89@gmail.com';
      $subject = 'From My Portfolio Website!';
      $message = $data[3]['value'];
      $headers = 'From: ' . $data[0]['value'] . " " . $data[1]['value'] . "\r\n" .
    ' Reply-To: '. $data[2]['value']  . "\r\n";

      mail($to, $subject, $message, $headers);
}

Now before you ask the function gets called I have checked with the debugger and the data is added corectly to the variables the only problems is that the mail does not arive to the destination.Am I doing somethign wrong?

  • 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-17T07:21:04+00:00Added an answer on June 17, 2026 at 7:21 am

    Check what function mail() returns.
    If returns false it means it’s error in php. If it returns true it means it is accepted for delivery but not necesery will reach its destination. In this case it’s more network related.

    More info at docs: http://php.net/manual/en/function.mail.php

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

Sidebar

Related Questions

I'm trying to send a email to user after successfully register. So that following
I am trying to send an email to the event administrator, after the user
I am trying to send email using AJAX and PHP but no success:( My
I'm trying to send email with some images attached in django. Code used is
I am trying to send email using smtp authentication through google but I am
Trying to send some email in my C# app. I am behind a proxy
I am trying to send an email that contains an attachment (a pdf file)
I am trying to send a confirmation mail after a user has registered on
I'm trying to send email with C#. Our email provider suggested that I use
I am trying WebIntent plugin to send email, but failed to send. Can you

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.