Hi Henson,
Reverse DNS failure for a mail server will certainly cause email to be  
rejected from some sites.  This could be a problem, but you'd have to  
know the details of how the mailservers were configured at your host,  
because you can't be certain that mail will be sent from the same  
server as your website.  Switching from "localhost" to something like  
"mail.yourdomain.co.nz" might fix the problem (if it means mail is  
sent from a different server), but no guarantees.

Certainly you should make sure the From: address in your email is  
valid and there isn't a mistake in the domain.

Now the spam thing is a different problem.  One of the problems with  
the content of your email is that you've used HTML only.  Many sites  
take this to be spam because email clients are not required to support  
HTML.  If you want to send HTML mail it should really be sent as  
multipart/alternative content mime (with both a plain text message and  
an HTML message).  PHPMailer will help you do this -- you can compose  
multipart/alternative content mime messages yourself, but i'd strongly  
suggest you don't do this because there are too many details that need  
to be right, otherwise you'll have different problems with just some  
recipients.
-Craig


On 20/05/2009, at 7:56 PM, henson wrote:

>
> I just asked my friend to run my script from his site and I received
> an email in my Yahoo mail although it went into the spam folder. At
> least, it went in.  Could it be my mail server is blocked or
> something?  I ran a diagnostic on my website on 
> http://www.mxtoolbox.com/diagnostic.aspx
> and it came back saying REVERSE DNS failed.
>
> Henson
>
> On May 20, 3:47 pm, Jevon Wright <[email protected]> wrote:
>> Try phpmailer, it's much, much easier than dealing with mail().
>>
>> Jevon
>>
>> On Wed, May 20, 2009 at 10:03 AM, Craig Anderson  
>> <[email protected]>wrote:
>>
>>
>>
>>
>>
>>> Hi.
>>> Ran across this one:
>>> http://snipplr.com/view/5147/php--smtp-mail-class/
>>> Which looks quite good. You should be able to replace
>>> "mail.yourserver.com" with "localhost".
>>> -Craig
>>
>>> On 20/05/2009, at 9:27 AM, henson wrote:
>>
>>>> HI Craig,
>>
>>>> I've tried adding the date to the headers,  Could you send me the  
>>>> php
>>>> mail() replacement code that uses SMTP.
>>>> Thanks
>>>> -Henson
>>
>>>> On May 20, 6:44 am, Craig Anderson <[email protected]> wrote:
>>>>> Hi.
>>>>> Oh yes, one other thing.  You should include an RFC822 date in the
>>>>> headers.  So add something like:
>>>>>          $mdate = gmdate("r", time());
>>>>>          $headers .= "Date: $mdate\r\n";
>>>>> Mail will be rejected from some mail servers if this date is  
>>>>> missing.
>>>>> -Craig
>>
>>>>> On 19/05/2009, at 5:54 PM, henson wrote:
>>
>>>>>> I'm having this problem with sending HTML mail to my yahoo.com
>>>>>> email.- Hide quoted text -
>>
>>>>> - Show quoted text -- Hide quoted text -
>>
>> - Show quoted text -
> >


--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to