|
Posted by Twayne on July 28, 2008, 2:13 pm
Please log in for more thread options > Thanks for this piece of info.
>
> It helps to know where the problem comes from.
>
>>> Hi,
>>
>>> I'm working on a website where there is a from from which I want to
>>> send the data by e-mail.
>>
>>> When I send myself the result with mail($my_email, $title, $message)
>>> everything works fine and I receive a plain text email. However, the
>>> people for which I'm doing the site receive some kind of error when
>>> I do the same thing but delivered to them > mail($their_email,
>>> $title, $message)
>>
>>> The error looks something like this:
>>
>>> Your message cannot be delivered to the following recipients:
>>
>>> Recipient address: servi...@theirdomain.com
>>> Reason: Illegal host/domain name found
>>
>>> I also used something like this in the script to make it work when
>>> sending it to myself:
>>
>>> ini_set('SMTP', 'mail.theirdomain.com');
>>> ini_set('sendmail_from', 'servi...@theirdomain.com');
>>
>>> Is it the fact that I send this email in plain text with no headers
>>> that could trigger some sort of spam filtering?
>>
>>> If so, what headers should I be using?
>>
>>> Thanks in advance
>>
>> I can't give a lot of detail, but it's because the Headers are
>> non-RFC compliant, I imagine. Without the envelope "from" and
>> "return path" etc. many ISPs will reject the mail. I imagine someone
>> who can give you specific details will be along shortly.
>>
>> HTH
Well, since no one else has come along yet I'll give you what little I
know from my meager experience:
You have to have From. Not the From that prints for the recipient, but
the From header in the envelope.
I think the Return Path is derived from that.
You need to identify the content type. e.g. texp/plain, etc.
Then the doctype, and etc. etc.. PHPNet and W3 schools both have good
articles on them; I'd do some checking there to get going if this is new
to you. Basically you have a set of requireds and then a set of "if you
wanna" types of headers.
I'm new at this too so getting too specific would be the blind leading
the blind <g>.
HTH
Twayne
|