473,581 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mail Function showing header info

162 New Member
I am using a standard mail function within an AMFPHP Class that i have used many times. Now, when i use it it does not work right. When a mail is sent, the $header info and html shows in the email.

I would like to know why the header info is showing in the email, along with why the HTML code is not rendering. I will post examples of code and result. Please provide a solution b4 i pull my hair out.

Running PHP 4.3.9 on Apache

[PHP]
function sendMail($vars) {

$email = "visitor@site.c om";

$headers ="MIME-Version: 1.0\r\n";
$headers .= "From: {$email}\r\n";
$headers .= "Return-Path: {$email}\n";
$headers .= "Reply-To: {$email}\n";
$headers .= "Message-Id: <".time()."@".$ _SERVER['SERVER_NAME'].">\n";
$headers .= "X-Mailer: php-mail-function-0.2\n";

$content = "<b>test</b>";

mail("email@exa mple.com", "Subject", $content, $headers);
}
[/PHP]

This is the email that is returned.
Expand|Select|Wrap|Line Numbers
  1. From: visitor@site.com
  2. Reply-To: visitor@site.com
  3. Message-Id: <1185426433@www.example.com>
  4. X-Mailer: php-mail-function-0.2
  5.  
  6. <b>test</b>
  7.  
Jul 26 '07 #1
2 1804
empiresolutions
162 New Member
Solution: http://phpbuilder.com/board/showthread.php? p=10816175#post 10816175
Jul 26 '07 #2
pbmods
5,821 Recognized Expert Expert
Heya Empiresolutions .

Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)
Jul 26 '07 #3

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

Similar topics

2
3319
by: Web Master | last post by:
Hi, I am having a little issue with Jacks Form mail php script. I have installed it and configured the form to get it to work, but for some bizarre reason I have 2 issues I can't seem to debug. Issue#1: I get 2 copies of the form that gets submitted each time. Issue#2: The header does not display the "FROM" information in Outlook, but...
8
5460
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I...
1
10054
by: bobano | last post by:
Hi everyone, I am writing a POP3 Client program in Perl. You connect to a POP3 Server and have a running conversation with the mail server using commands from the RFC 1939 Post Office Protocol. This program can perform 5 options from a menu on your POP3 mail by logging in with the correct POP3 server along with a user name and password that you...
6
1593
by: chris | last post by:
My code <?php $name = "freddie"; $message.="Hi Joe,\n"; $message.="\t $name has Filled out the form on the Website,\n"; $message.="The information from the form is listed below:\n"; $message.="more info\n"; $message.="more info\n";
2
17465
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to the bare minimum: System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("<my mail server IP>", 25); smtp.Send("<one of my email...
12
4562
by: e_matthes | last post by:
Hello everyone, I am trying to use the mail() function to send a simple, text-only message. I have two websites hosted by the same company, on different servers. One is old and established, one I am currently developing. I am testing the mail functionality by sending a test message to an email account associated with my old website, and...
2
1901
by: bmamo | last post by:
HI, i have a problem similar to this one, but mainly the problem is that my php connects to the mails server, but disconnects immediately. for example: here is the log of the mail server: #Software: Microsoft Internet Information Services 6.0 #Version: 1.0 #Date: 2007-08-07 15:00:23 #Fields: date time c-ip s-sitename s-computername...
5
1714
by: Sebzzz | last post by:
Hi, I'm working on a website where there is a from from which I want to send the data by e-mail. When I send myself the result with mail($my_email, $title, $message) everything works fine and I receive a plain text email. However, the people for which I'm doing the site receive some kind of error when I do the same thing but delivered to...
2
1672
by: houghi | last post by:
I am trying to do two things at a time. I want to give the user the opportunity to save a file and at the same time see new information on the screen. I can do it seperately, but not together. What I have is the following: @ob_end_clean(); $SHOW = "1"; if ($SHOW == 1) { // Show all the info on a page
0
7876
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6563
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5681
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2307
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 we have to send another system
1
1409
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.