473,378 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

problems with mail() and email forwarding

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
5 3924
..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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ronald Fischer | last post by:
Could someone explain to me what is the difference between <!ENTITY % Foo 'Bar' > and <!ENTITY Foo 'Bar' > From my understanding, the "macro" Foo has to be referenced in the first case...
5
by: jose luis fernandez diaz | last post by:
Hi, When I compiling the program below: #include <map> using namespace std; template<typename td1, typename td2, typename td3,typename td4> class Tarificador
7
by: Andy K | last post by:
Hi , I have an existing database (on a Linux Red Hat ES3) where the replication function exists but does not work because the target database has been shutdown months ago . My question is...
2
by: Patrick Hill | last post by:
Hello, I have a web form that is a email page. When the user fills out the form and clicks send there is a "The server rejected one or more recipient addresses. The server response was: 550 5.7.1...
1
by: Tiabes | last post by:
Hi, I am using System.Web.Mail for a email feature in an Intranet Application (ASP.NET). I need to use NTLM Authentication: ...
2
by: Adam Witney | last post by:
Forwarding to the mailing list, as I don't know how to fix it.... ------ Forwarded Message From: Henning Klein <kleinh@rz.uni-potsdam.de> Date: Tue, 22 Jun 2004 22:09:08 +0200 To:...
3
by: Nathan Sokalski | last post by:
I have an ASP.NET page that sends a Mail.MailMessage to several email addresses (all mine). However, one of the addresses, the one ending in @verizon.net, does not seem to be recieving the message...
3
by: Ibrahim. | last post by:
Hello, Im getting the following error when mail is sent from ASP.NET 2.0 website. CDO.Messaging componenet is used for sending mail. " The message was not able to be transmitted to the SMTP...
15
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.