Solved

php email sending and a From :Reply@MISSING_DOMAIN in the from tag

Posted on 2011-09-20
6
416 Views
Last Modified: 2012-05-12
I am sending out an email from a php page using the below code
and the result i am getting is below but what do i need to add to see my address instead of  Reply@MISSING_DOMAIN

 From :Reply@MISSING_DOMAIN
 To :garryihill@hotmail.com
 Subject :perp 22 has sent a reply to the poll
 Date :Tue, 20 Sep 2011 09:52:37

*****************************************************************************
$to = 'abc@googlemail.com ';


// subject

$subject = $_GET['companyname'];
// message

<html>
<head>
  <title> has sent a reply</title>
</head>
<body>
  <p>the following data has been added to the Data base subjest data</p>
 
</body>
</html>
';
$message .= 'Type of client: '.$_GET['typeclient']. "....\r\n";
$message .= 'Email: '.$_GET['txtemail']. "....\r\n";
$message .= 'Title: '.$title. ".....\r\n";

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'From: Reply from ' . "\r\n";


// Mail it

mail($to, $subject, $message, $headers);
0
Comment
Question by:sydneyguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 24

Accepted Solution

by:
mankowitz earned 250 total points
ID: 36567859
where do you specify the reply address?

maybe you need:

// Additional headers
$headers .= 'From: person@example.com\r\n";
0
 
LVL 13

Assisted Solution

by:Hugh McCurdy
Hugh McCurdy earned 250 total points
ID: 36567925
mankowitz is very close, IMHO.  You have

 $headers .= 'From: Reply from ' . "\r\n";

That's where you need mankowitz's person@example.com  (except it should be a real e-mail address or at least no-reply@example.com).
0
 

Author Comment

by:sydneyguy
ID: 36568094
ok throwing back a

From:         Reply@, UNEXPECTED_DATA_AFTER_ADDRESS@.SYNTAX-ERROR.

line of code i am using is
$headers .= 'From: autoresp@abc.com' . "\r\n";
0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
LVL 24

Expert Comment

by:mankowitz
ID: 36568116
I don't know if single quotes will escape correctly. Try these and see if any work

$headers .= "From: person@example.com\r\n";

$headers .= "From: person@example.com\r";

$headers .= "From: person@example.com\n";
0
 
LVL 13

Expert Comment

by:Hugh McCurdy
ID: 36568195
Good point by mankowitz about the quotes.  I almost always use double quotes unless I have a good reason to use single quotes.  It is important to remember that the different quotes work differently in PHP (as mankowitz pointed out).
0
 

Author Closing Comment

by:sydneyguy
ID: 36568240
$headers .= 'From: autoresp@abc.com' . "\r\n";

this worked fine did not quite make sense because i had it workign before but i have to files a dev and real in diff dirs and was mod the dev file but was actually running the real file, change the right file and off she went thannks for the extra pair of eys
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
The viewer will learn how to count occurrences of each item in an array.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question