By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,828 Members | 801 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,828 IT Pros & Developers. It's quick & easy.

problems with mail() and email forwarding

P: n/a
Hi All,
I'm experiencing problems with sending mail using mail() to forwarded
email accounts. The problem seems to revolve around the optional 4th
argument of mail(), namely 'additional headers'.

It seems that when I populate this 4th argument of mail(), any emails
sent to an email forwarding service email address (ukreg/fasthosts
actually) fail to reach their destination. Direct email addresses seem
to work fine.

Why is this?. Has anyone any ideas?.

Thanks in advance,
Dave

Jun 24 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
..oO(Dave)
>I'm experiencing problems with sending mail using mail() to forwarded
email accounts.
What problems?
>The problem seems to revolve around the optional 4th
argument of mail(), namely 'additional headers'.

It seems that when I populate this 4th argument of mail(), any emails
sent to an email forwarding service email address (ukreg/fasthosts
actually) fail to reach their destination. Direct email addresses seem
to work fine.

Why is this?. Has anyone any ideas?.
Some more details and/or code would help. What do you send as the 4th
parameter? What happens with the mails? Do they bounce? Are they
considered as spam? Does it rain when you send them?

Micha
Jun 24 '07 #2

P: n/a
Message-ID: <11**********************@k79g2000hse.googlegroups .comfrom
Dave contained the following:
>It seems that when I populate this 4th argument of mail(), any emails
sent to an email forwarding service email address (ukreg/fasthosts
actually) fail to reach their destination. Direct email addresses seem
to work fine.

Why is this?. Has anyone any ideas?.
It will most likely be a Fasthosts thing. They have a tendency to do odd
things IME, especially on Windows hosting. Check their knowledgebase or
drop support a line.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jun 25 '07 #3

P: n/a
Message-ID: <7i********************************@4ax.comfrom Geoff
Berrow contained the following:
>
>>It seems that when I populate this 4th argument of mail(), any emails
sent to an email forwarding service email address (ukreg/fasthosts
actually) fail to reach their destination. Direct email addresses seem
to work fine.

Why is this?. Has anyone any ideas?.

It will most likely be a Fasthosts thing. They have a tendency to do odd
things IME, especially on Windows hosting. Check their knowledgebase or
drop support a line.
Just remembered. Last time I had a problem like this I had to add the
following line.

ini_set ("sendmail_from", "po********@example.com");

where the domain is the site domain.

I've no idea why, especially as the from address is being defined in the
4th parameter, but it works.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jun 25 '07 #4

P: n/a
On 24 Jun, 17:46, Michael Fesser <neti...@gmx.dewrote:
.oO(Dave)
I'm experiencing problems with sending mail using mail() to forwarded
email accounts.

What problems?
Try reading beyond the first sentence.
The problem seems to revolve around the optional 4th
argument of mail(), namely 'additional headers'.
It seems that when I populate this 4th argument of mail(), any emails
sent to an email forwarding service email address (ukreg/fasthosts
actually) fail to reach their destination. Direct email addresses seem
to work fine.
Why is this?. Has anyone any ideas?.

Some more details and/or code would help. What do you send as the 4th
parameter? What happens with the mails? Do they bounce? Are they
considered as spam? Does it rain when you send them?
I've experimented further, and these are my findings:
If I define the $headers (4th field) of the mail() function to say:

$headers = "From: fr*******@mydomain.co.uk";

then this will work for both fasthost and non-fasthost email
addresses. However, something like this:

$headers = "From: Fred Smith";

won't ever arrive if a fasthosts forwarding email address is used.
However, it seems ok for normal 'direct' email address.

Any ideas?. Is the second format for headers valid?.

Ta in advance,
Dave

Jun 30 '07 #5

P: n/a
Dave wrote:
On 24 Jun, 17:46, Michael Fesser <neti...@gmx.dewrote:
>.oO(Dave)
>>I'm experiencing problems with sending mail using mail() to forwarded
email accounts.
What problems?

Try reading beyond the first sentence.
>>The problem seems to revolve around the optional 4th
argument of mail(), namely 'additional headers'.
It seems that when I populate this 4th argument of mail(), any emails
sent to an email forwarding service email address (ukreg/fasthosts
actually) fail to reach their destination. Direct email addresses seem
to work fine.
Why is this?. Has anyone any ideas?.
Some more details and/or code would help. What do you send as the 4th
parameter? What happens with the mails? Do they bounce? Are they
considered as spam? Does it rain when you send them?

I've experimented further, and these are my findings:
If I define the $headers (4th field) of the mail() function to say:

$headers = "From: fr*******@mydomain.co.uk";

then this will work for both fasthost and non-fasthost email
addresses. However, something like this:

$headers = "From: Fred Smith";

won't ever arrive if a fasthosts forwarding email address is used.
However, it seems ok for normal 'direct' email address.

Any ideas?. Is the second format for headers valid?.

Ta in advance,
Dave


From: must include a valid email address. "Fred Smith" is not a valid
email address.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 30 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.