473,511 Members | 10,195 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mail function not working correctly

amarniit
13 New Member
hello,

i a creating a enquery form on my website but i am ot able to use php mail function. i try this code but mail not sent to my id. please suggest me how can i correct this code.


Expand|Select|Wrap|Line Numbers
  1. <?php
  2.                                     }else{
  3.                                         if (isset($_POST["from"])) {
  4.                                             $email_a = $_POST["email"];
  5.                                             $headers =  "From: ".$email_a. "\r\n" . 
  6.                                             $subject = $_POST["subject"];
  7.                                             $message = $_POST["message"];
  8.                                             // message lines should not exceed 70 characters (PHP rule), so wrap it
  9.                                             $message = wordwrap($message, 70);
  10.                                             // send mail
  11.                                             mail("amarniit@gmail.com",$subject,$message,$headers);
  12.                         echo '<tr><td></td><td align="left" valign="top" ><div style="padding:20px;">Thank you for sending us feedback</div></td></tr>';
  13.  
  14.                                             }
  15.                                             }
  16.                                         ?>

my website is
http://kanjitour.com/contact.php
Nov 6 '14 #1
1 1204
Dormilich
8,658 Recognized Expert Moderator Expert
have you checked your spam folder? mails like that where the FROM email address (gmail.com) does not match the sending server (kanjitour.com) are likely to end up there
Nov 6 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2604
by: Jim Seymour | last post by:
I have a contact form that uses PHP's mail() function. It recently came to my attention that (some?) MS-Windows mail servers may not properly process data given to the mail() function that's only...
4
4807
by: Data Goob | last post by:
This one has me stumped. How did SuSE disable the mail() function in their RPM'd version of PHP? ( This is their install-version of PHP with RPMs not what you download from PHP.net ) I have...
0
4308
by: Ask Me | last post by:
Hi, I am using the mail function and specify a remote SMTP server. After setting the variables, the command is issued as: mail($receiver1, $subject, $mailtxt, $from); The relevant section...
17
2812
by: Jonathan Burd | last post by:
Greetings everyone, Reading about the int64_t types added by C'99, I decided to implement a 64-bit version of atoi for my own library. However, for the test number provided, it isn't doing what...
2
2026
by: Bandul | last post by:
Hi everyone I am trying to send a e-mail using the mail() function. Now i try to send more than one data from mysql database so i must use example $results=mysql_num_rows($result_query)...
11
12295
by: Lieven | last post by:
Hey, I had a hard disc problem last week on my server. I replaced the disc and copied al the files to the new hard disc, everything works fine again except some php scripts that are using the...
1
2206
by: crescent_au | last post by:
hi all, i have this mail() function which works fine but i've tested it with hotmail where i use hotmail email address for sender and receiver also hotmail. If I type in a not existent email...
9
2884
by: shror | last post by:
hi every body, i have a problem which is when i was checking my mail() form it work fine but the problem is that the form configuration is not set correctly, in details: the from var is not...
1
2091
prabirchoudhury
by: prabirchoudhury | last post by:
mail() function stopped working after server upgraded to php 4.4.4. not getting any error on server error-log file and the php page . any idea please. using mail function code $to =...
1
1364
by: rubi tiwari | last post by:
Hey am usng swift mail function for sending a mail in php and its properly in working in localhost i using wamp server but when my software is online then it not working mail not to in working ...
0
7148
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7089
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5072
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1581
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.