Email not being sent from PHP

greg

Active Member
Sep 4, 2001
37
0
306
Hi. We use PHP's mail() function to send our new customers welcome emails. It appears though that not every email is making it through to our customers and we are suffering reputation wise because of this. Some do still get through, but only for certain domains.

Does anyone know what the problem could be and how to solve it?

Any help would be greatly appreciated.

Thanks in advance.
 

patchwork

Well-Known Member
Nov 2, 2001
95
0
316
I had the same problem a while back, the source of the problem was my DNS settings.

In the exim_mainlog file I found error messages just like this

&Sender address rejected: Domain not found&

The problem was I had not set-up subdomains on my main server domain. To solve the problem I had to add my machine name as a sub domain on the servers main domain.

Example... if your servers name is &sub& and your main server domain is domain.com, then you have to make sure http://sub.domain.com is a valid address. Then when the target server does a domain lookup for [email protected] it does resolve to a valid IP address, if it doesn't resolve, then some servers will reject the email as spam.

Around 50% of the mail from my PHP scripts was not getting delivered due to this problem.

Pete
 

WildWayz

Well-Known Member
Aug 14, 2001
209
0
316
Another problem is if you do not set the FROM field - other mailservers will reject it.

--James
 

JapAniManga.ch

Well-Known Member
Aug 11, 2001
88
0
306
Switzerland
have same problem

hello,

i have the same problem, some mailservers reject the mails who vbulletin sends out and say's:

[email protected]&... Invalid Address

the a-entry is ok, when i go via ie on the maschine-name i get on a welcome-apache-site. can also ping the maschine name.

in vbulletin is also all ok.

does anybody know what i can do ? a script what i can use ??
 

jimd

Member
Apr 11, 2002
7
0
301
Here's a very similar problem I solved

;) I would sestup my new customers, then send them an email. Problem was, I just created a DNS entry on my outgoing server, that sent their email to their NEW account instead of their old one where they were waiting for it to show up!
Just a gotcha to watch for!
jimD
 

jimd

Member
Apr 11, 2002
7
0
301
Here's a very similar problem I solved

;) I would sestup my new customers, then send them an email. Problem was, I just created a DNS entry on my outgoing server, that sent their email to their NEW account instead of their old one where they were waiting for it to show up!
Just a gotcha to watch for!
jimD