Re: Ever seen a mail failure like this?



Hello,

on 04/24/2009 09:26 PM Mike Silva said the following:
I've got a simple site that uses the PHP mail function to send a
"contact us" email to the site owner. The mail code is straight out
of the PHP online manual, using a few addresses in the To header and
using the additional headers parameter (no cc or bcc). And it acts
weird. To be specific:

-the mail function returns a success code

-mail sent to other domains gets received

-mail sent to the same domain as the website never gets through

-mail sent from other domains to the domain email does get through

That is, the only thing that fails is sending the email from the
website to an email address of that same website. Everything else
works as expected.

To make things more interesting, I uploaded the entire website onto
another host and from that host the non-working email addresses now
receive the email. That is, if I run the website on HostCompanyA,
then the email is received where the domain is hosted by HostCompanyB,
but if I run the same code on HostCompanyB the email does not get
through.

I've been talking with the hosting company but no luck so far. Does
this problem ring a bell with anybody?

There can be many reasons for that to happen. I recommend that you watch
this slide presentation that talks precisely about sending messages that
actually reach the destination.

http://www.phpclasses.org/browse/video/3/package/9.html

As for your problem, I recommend that you set the return path address
because it is very likely that the messages may be bouncing for some
reason. You need to see what the bounce messages say to understand the
problem.

Setting the return path address depends on the platform you are running.
If you use this MIME message class and set the Return-Path header and
internally the class figures how to set the bounce address to what you
assigned to that header. Take a look at the test_email_message.php
example script.

http://www.phpclasses.org/mimemessage



--

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
.



Relevant Pages

  • Re: Ever seen a mail failure like this?
    ... "contact us" email to the site owner. ... The mail code is straight out ... website to an email address of that same website. ... If you use this MIME message class and set the Return-Path header and ...
    (comp.lang.php)
  • Re: *.php files not found on non-standard website
    ... PHP works just fine for me on every single one of my IIS5 websites, ... Every single website is exactly the same as every other website -- except ... If you have ASP and PHP scripts in the same directory and you can access ASP ... with a different host header pointing to a different location within wwwroot ...
    (microsoft.public.inetserver.iis)
  • Re: Header problems
    ... > I have a php based website that generally works OK but in one place I am ... > When it tries to execute this I get a "Cannot modify a header once it has ... This is a problem of whitespaces, the included file most likely has a ... which makes that there has been an output from the "php" before the header is ...
    (alt.php)
  • PHP Email Form Not Working Since Server Switch
    ... I have a website with a php contact form. ... $message .= 'A client would like to contact you, ... header("Location: ...
    (php.general)
  • Simple Form Script Not Working After Server Switch
    ... I have a website with a php contact form. ... $message .= 'A client would like to contact you, ... header("Location: ...
    (alt.php)

Quantcast