473,395 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Need to display the body of content while sending mail to server

1
My codings:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.     header('Content-type: application/json');
  3.     $status = array(
  4.         'type'=>'success',
  5.         'message'=>'Email sent!'
  6.     );
  7.  
  8.     $name = @trim(stripslashes($_POST['name'])); 
  9.     $email = @trim(stripslashes($_POST['email'])); 
  10.     $subject = @trim(stripslashes($_POST['subject'])); 
  11.     $message = @trim(stripslashes($_POST['message'])); 
  12.  
  13.     $email_from = $email;
  14.     $email_to = 'vijikanmani18@gmail.com';
  15.  
  16.     $body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message;
  17.  
  18.     $success = @mail($email_to, $subject, $body, 'From: <'.$email_from.'>');
  19.  
  20.     echo json_encode($status);
  21.     die; 
  22.     ?>
MY OUTPUT looks like:

Name:

Email:

Subject:

Message:

Kindly please help me

No contents displayed in it..
Apr 12 '15 #1
1 1427
Dormilich
8,658 Expert Mod 8TB
that means you have not used POST method.
Apr 13 '15 #2

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

Similar topics

1
by: festivalman | last post by:
Hi, sorry if this is in the wrong spot. Finding the newsgroups on MS's site could have been easier Here's my problem I've got some old asp's that are running our simple web site. In a section,...
3
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was...
5
by: Zile | last post by:
I am trying to send mail from web page in asp.net 2.0/VB 2005: Dim Poruka As New System.Web.Mail.MailMessage myMessage.From = "matematic@gmail.com" myMessage.To = "matematic@hotmail.com"...
0
by: kencana | last post by:
Hi all, I got problem in sending email with image file attached. the problem is that i can't see the image, apart from that i also try to attach a txt file and it gave me no luck. the txt file in...
4
by: Sonnich Jensen | last post by:
Hi all! I use the following for sending mail from ASP, but there is a problem - it goes to a intranet thing (eRoom) which does not read it, while Outlook etc does not have any problems. eRoom...
7
by: undbund | last post by:
Hi I am creating a newsletter system. The software should run from desktop computer (localhost) but be able to send email to anyone on the internet. Can you guys give me some ideas on how to...
3
by: samvb | last post by:
Hello Gusy, I want to access a local mail server using imap from php. But i was not able to connect at all. I have read many codes but none of them worked for me. Do I need any special "imap" or...
3
by: yuanyun.ken | last post by:
hi,dear all js gurus. In my app, server responses some text like: '&nbsp;&nbsp; ' and I need display these content in textarea. But Html would convert specail characters to space, and ignore line...
1
maliksleo
by: maliksleo | last post by:
hi i am using the following class for email sending but getting this error "Failure sending mail" Imports System.Net.Mail Public Class MailHelper ''' <summary> ''' Sends an mail...
1
by: Hardy123 | last post by:
Hi I m developing a desktop application using C# I m trying to use gmail's smtp sever on port 587 but it is giving me an exception that target machine actively refuesd at 74.125.127.109:587 Can...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.