Solved

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

Posted on 2011-09-20
6
407 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
object oriented programming comparison 5 54
Access Object's Property 9 22
hiding/removing php extension - best practice 4 24
Method for submitting dynamically created rows 20 16
Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
In this video we show how to create an Address List 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 Organization >> Ad…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

910 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

19 Experts available now in Live!

Get 1:1 Help Now