473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PHP mail script to bad address not bouncing

I'm trying to create a PHP script to send mail to a list of addresses.
I'm sending mail okay, because the messages arrive in an account that I
can check, but messages to a known bad address aren't being bounced
back to the sending address.

Here's the line of code I'm using:

$mailok = mail("me@goodaddress.com,me@badaddress.com","this is a test",
"this is a test", "From: me@sendaddress.com");

I receive the message at me@goodaddress.com just fine. If I send a
manual message to me@badaddress.com, the message bounces. If I manually
bounce the message that I received at me@goodaddress.com then it
bounces back to me@sendaddress.com.

I need to figure out why messages to me@badaddress.com sent by the PHP
script aren't bouncing back to me@sendaddress.com.

Aug 9 '05 #1
2 2458
st***@hunnicutt.com wrote:
I'm trying to create a PHP script to send mail to a list of addresses.
I'm sending mail okay, because the messages arrive in an account that I
can check, but messages to a known bad address aren't being bounced
back to the sending address.

Here's the line of code I'm using:

$mailok = mail("me@goodaddress.com,me@badaddress.com","this is a test",
"this is a test", "From: me@sendaddress.com");

I receive the message at me@goodaddress.com just fine. If I send a
manual message to me@badaddress.com, the message bounces. If I manually
bounce the message that I received at me@goodaddress.com then it
bounces back to me@sendaddress.com.

I need to figure out why messages to me@badaddress.com sent by the PHP
script aren't bouncing back to me@sendaddress.com.

The bouncing is handled by the server the mail is sent to. If that
server just deletes mail to bad addresses, nothing will bounce.

Perhaps someone can tell us what will happen when the other server is
not existing?
Aug 9 '05 #2
st***@hunnicutt.com says...
I'm trying to create a PHP script to send mail to a list of addresses.
I'm sending mail okay, because the messages arrive in an account that I
can check, but messages to a known bad address aren't being bounced
back to the sending address.

Here's the line of code I'm using:

$mailok = mail("me@goodaddress.com,me@badaddress.com","this is a test",
"this is a test", "From: me@sendaddress.com");

I need to figure out why messages to me@badaddress.com sent by the PHP
script aren't bouncing back to me@sendaddress.com.


Bounces are usually sent to the "reply-to" rather than the "from" address,
and you haven't set one. In any case you are better off setting a
canonical sender address as well as or instead of setting one in the
header, as some spam-catchers will ditch your mail.

Try:
$mailok = mail("me@goodaddress.com,me@badaddress.com","this is a test",
"this is a test", "From: me@sendaddress.com", "-f me@sendaddress.com");

As suggested in:
http://php.planetmirror.com/manual/e...mail.php#51406

Geoff M
Aug 10 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: pee2pee | last post by:
Hi, I have below code: <html> <head> <title>Contacting Worldpay, Please wait.......</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body...
1
by: dave | last post by:
Hi, Thanks to everyone who helped with my previous form parse issue, i can't believe it was something so simple. Anyway i tried to work the script and it for some reason sent from www which is...
9
by: AJ | last post by:
Hi All I've got a little newsletter system that I put together for one of my customers. Basically, it's a table with firstname, lastname and e-mail address. The script then goes through the...
14
by: OldGuy | last post by:
Hi All Sendmail 8.12.11 php 4.3.9 Sendmail is installed and works properly. php is NOT in safemode from the command line; mail user@domain.com < testmsg works fine.
2
by: MostlyH2O | last post by:
Hi Folks, I run a small website for a membership organization - and I have created an ASP front end for an access database that allows the board members to manage their membership roster (names,...
6
by: Mike the Canadian | last post by:
I am having a very strange problem sending email with php. I have two domains. I can send an email to one domain using php but not the other. If I put both email addresses in the mail command only...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
39
by: Viken Karaguesian | last post by:
Hello all, <SIGH> I'm soooooo sick and tired of getting spam e-mails. I'm sure that part of the reson for this is that my e-mail address is publicly available on my website, ready to be picked...
6
by: Vik Rubenfeld | last post by:
I've got this form mail program that is called as an action from an HTML form. It runs with no errors, but the email is never sent - at least, it's never received. Here's the code: <? $email =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.