Solved

Can't Put Variables in Bounced Email

Posted on 2009-04-11
7
345 Views
Last Modified: 2012-05-06
When I send an email to the bounce address hits a catch-all mail-pipe (121-314-bounce@myaddress.com) using PHP with the FROM and REPLY-TO and RETURN-PATH variables set as 121-314-bounce@myaddress.com, that address is not in the bounced email. It simply uses popuser@myaddress.com.
0
Comment
Question by:EMB01
[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
  • 4
  • 3
7 Comments
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 24124252
I'm not sure of this, but I think you may need to speak with your email server provider about this.  Try to get all the headers and see if "popuser" is substituted everywhere.

Puzzled, ~Ray
0
 
LVL 14

Author Comment

by:EMB01
ID: 24125546
If you're puzzled now, listen to this... I received spam from someone sending to "lagemarketbuildersbeh@emarketbuilders.com," an address which doesn't exist. On this bounced message, the $from variable in my pipe script returns "lagemarketbuildersbeh@emarketbuilders.com" as it should. But, when I send an email to "121-314-bounce@emarketbuilders.com" which is another non-exisiting address, the $from variable reads "admin@emarketbuilders.com," not "121-314-bounce@emarketbuilders.com" as it is supposed to.

What do you think I should do to solve this?
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 24125726
If you have cPanel available, you can look at the message routing for email.  Circa 2001, I used to put all the mis-addressed email into a catch-all bucket so I could get messages from people who accidentally misspelled the name, but that was before the advent of Spam.  Feh.  Now I just discard the mis-addressed email.  Anyway, all of those settings are in the "mail" section of cPanel.

It almost sounds like there is a REGEX or some other logic at work in the mail router.

If you don't have cPanel or a similar control tool, it may be a tech service call.
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 14

Author Comment

by:EMB01
ID: 24125862
Yeah, I have Plesk... and my host doesn't usually support anything that even sounds "extra."
0
 
LVL 14

Author Comment

by:EMB01
ID: 24132861
How about this... I get failure notices as attached, so what should I do to get the headers (such as Reply-To) from this message?
Hi. This is the qmail-send program at emarketbuilders.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
 
<email@website.com>:
Sorry, I wasn't able to establish an SMTP connection. (#4.4.1)
I'm not going to try again; this message has been in the queue too long.
 
--- Below this line is a copy of the message.
 
Return-Path: <admin@emarketbuilders.com>
Received: (qmail 15779 invoked by uid 48); 6 Apr 2009 12:29:36 -0700
Date: 6 Apr 2009 12:29:36 -0700
Message-ID: <20090406192936.15764.qmail@emarketbuilders.com>
To: email@website.com
Subject: My subject
From: EMB <admin@emarketbuilders.com>
Reply-To: EMB <admin@emarketbuilders.com>
MIME-Version: 1.0
Content-type: text/html;charset=iso-8859-1
X-Mailer:: PHP/5.2.6

Open in new window

0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 24132998
You can use explode() to break the message apart into an array. Do it once like this and then var_dump() the array to see what you've got.  A little tinkering will get you the right stuff.

$array = explode('Reply-To:', $message)
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 25439468
Thanks for the points.  Coincidentally I am just now working on a project that uses this technology - processing fields out of email into POST data for an online app.  What timing! ~Ray
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XML loaded in a form with dropdown 6 57
PHP and accessing Array Elements 3 34
Prestashop modules custimzation 2 28
replacate wordpress websites 3 24
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

752 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