473,767 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to stop mail() errors going to postmaster@etc. ..?

Hi,
In my web form, which registers email addresses, my php script does
some email validation, but people still mistype email addresses which
are in a valid format but don't exist.
PHP tries to send them an email, using the mail() function and an
error is bounced back to po********@serv er.name
How can I make sure that the errors aren't bounced back to the
postmaster? He doesn't like them!
Thnks,
Mike
Jul 17 '05 #1
4 5234
Mike wrote:
In my web form, which registers email addresses, my php script does
some email validation, but people still mistype email addresses which
are in a valid format but don't exist.
PHP tries to send them an email, using the mail() function and an
error is bounced back to po********@serv er.name
How can I make sure that the errors aren't bounced back to the
postmaster? He doesn't like them!


Not sure if this works ...

<?php
ini_set('sendma il_from', 'YOUR_BOUNCE_AD DRESS@HERE');
// ...
mail('i******** *@adress.com', $sbj, $msg);
?>

I guess your php.ini has
se************* *********@serve r.com

The idea with the above script is to change that :-)
HTH

--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Jul 17 '05 #2
Pedro <he****@hotpop. com> wrote in message news:<bl******* *****@ID-203069.news.uni-berlin.de>...
Mike wrote:
In my web form, which registers email addresses, my php script does
some email validation, but people still mistype email addresses which
are in a valid format but don't exist.
PHP tries to send them an email, using the mail() function and an
error is bounced back to po********@serv er.name
How can I make sure that the errors aren't bounced back to the
postmaster? He doesn't like them!


Not sure if this works ...

<?php
ini_set('sendma il_from', 'YOUR_BOUNCE_AD DRESS@HERE');
// ...
mail('i******** *@adress.com', $sbj, $msg);
?>

I guess your php.ini has
se************* *********@serve r.com

The idea with the above script is to change that :-)


Thanks,
Unfortunately it didn't work.
Neither did adding these values to the header:

$headers .= "Errors-To: m.*******@mikes address.uk\r\n";
$headers .= "Return-Path: m.*******@mikes address.uk\r\n";

Any other suggestions?
I guess this must be a fairly common scenario.
Thanks,
Mike
Jul 17 '05 #3
Mike wrote:
Neither did adding these values to the header:

$headers .= "Errors-To: m.*******@mikes address.uk\r\n";
$headers .= "Return-Path: m.*******@mikes address.uk\r\n";

Any other suggestions?


What about using all that and the fifth parameter to the mail function?

<?php
mail($to, $sbj, $msg, $xhdr, '-f m.*******@mikes address.uk');
?>

if your server uses sendmail (or a compatible daemon).

--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Jul 17 '05 #4
Pedro <he****@hotpop. com> wrote in message news:<bl******* *****@ID-203069.news.uni-berlin.de>...
Mike wrote:
Neither did adding these values to the header:

$headers .= "Errors-To: m.*******@mikes address.uk\r\n";
$headers .= "Return-Path: m.*******@mikes address.uk\r\n";

Any other suggestions?


What about using all that and the fifth parameter to the mail function?

<?php
mail($to, $sbj, $msg, $xhdr, '-f m.*******@mikes address.uk');
?>

if your server uses sendmail (or a compatible daemon).


Thanks Pedro,
That seems to have done the trick.
Cheers,
Mike
Jul 17 '05 #5

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

Similar topics

1
1678
by: Dirk Försterling | last post by:
Hi, sorry for reposting, but it seems my message just hit nothing but air. If I posted to the wrong list or did something else wrong with the message, please let me know. I really want to know what's going on but still found nothing. I do not know when and where the statements are produced that lead to the error messages. It seems they were generated by postgres internally but I cannot see when and why. How can
5
68081
by: Amueerie | last post by:
is there a way to stop windows from going to sleep? i tried to check if there is a setting for this, but no. during presentations or discussions, my computer goes to sleep & then i have to login again. this is a headache, how can i overcome this issue (win xp prof), i am willing to write a small .net tool to keep my computer awake if i have to. regards,
5
1855
by: Nathan Sokalski | last post by:
I am moving an application that involves sending email from 1.1 to 2.0. I am attempting to convert the email-sending code from System.Web.Mail to System.Net.Mail. I think I have most of this accomplished, but I am trying to find the System.Net.Mail equivelant of System.Web.Mail.MailMessage.BodyFormat. In the past, I used code such as the following to specify whether the message was html or text: mymessage.BodyFormat =...
2
2185
by: beardo265 | last post by:
Hi, I've got a problem with a bunch of "PHP Warning" and "PHP Notice" messages being dumped into my apache error log, on a FC4 server. I tried editing the /etc/php.ini file, changing the "error_log =" to it's own file, and even tried turning off logging all together. No luck. No matter what I do, these messages still end up my apache log. How do I fix this?
1
1191
by: mercea | last post by:
hi all, i have a grid view that can be edited. anytime i edit the data in the gridview, it goes back to the top of the page and i have to scroll down all the way to view the edited entry. how do i stop the page from going to the top after editing? thanks
1
3057
by: =?Utf-8?B?VGFsYWxTYWxlZW0=?= | last post by:
i have facility in my website which sends an e-mail to the cleint's inbox..... i am getting a problem when ever i sends an e-mail.. i tried with Hotmail and Yahoo, e-mail goes to the "Junk Mail" folder not the actual inbox.... how i can get e-mail sent the clients inbox not in their "Bulk" or "Junk Mail" box thanks my send e-mail page C# codes are below:
12
262
by: Twayne | last post by:
Hi, I can't get the following code snippet to stop throwing errors except to modify it exactly as shown here by adding the single quote to the end of the first line and commenting out all but the first line: ----------------- <?php <========= This is line 108 mentioned in the error msg $mailuser="nodoby@spamcop.net"; $header="Return-Path: ".$mailuser." \r\n";
6
4199
by: simon2x1 | last post by:
the code below is my mail code its working but message sent to the email is going to the spam mail not the inbox how can make the message go to indox <?php require_once("connect.php"); // value sent from form $email_to=$_POST; // table name
2
1211
by: BaseballGraphs | last post by:
Hello, I have a two part question. My first question is what I asked in the subject of the question: How can I stop AutoComplete from going to a new page when selecting the value from my database. The reason I need to stop it from going to the next page is because I want the user to select a player value and a statistics value from a drop down menu. The second part of my question includes how I can pass the id variable from the drop down...
0
9571
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9960
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9841
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7383
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5424
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3930
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2807
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.