Solved

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

Posted on 2011-09-20
6
406 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
  • 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

Shouldn't all users have the same email signature?

You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now