Some specific mailboxes wont receive mail at all!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
geodeath
Forum Newbie
Posts: 8
Joined: Wed Mar 28, 2007 7:38 pm

Some specific mailboxes wont receive mail at all!

Post by geodeath »

Hello all,
This is something that bugs me from time to time.
This particular host/ISP has problems receiving mail sent from forms hosted by itself!
So, my mail script will send mail fine in my gmail and yahoo acount but the mailbox which is hosted by the same company that hosts the script will never get it.
I just cannot imagine the problem. I ve done some tests and i am now here to investigate this with some of you.

The code to send the mail is

Code: Select all

mail("blahblah@gmail.com",$Subject,$Message, "From: $email");
Just in case its needed, the $message contents are the pairs of needed data such as Name:value, Address:value, Phone:value with a \n between them
and a footer which is 3 new lines below the actual text.

Thats all.
I can post the whole script if needed, but the other parts are just the form and nothing more. I can also add any email address you might want so you
can receive the actual email just in case it contains stuff not accepted by some servers (??? What do i know?).
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

It may be the way the headers are formed. The spam catcher may be working your mails into the trash.
geodeath
Forum Newbie
Posts: 8
Joined: Wed Mar 28, 2007 7:38 pm

Post by geodeath »

I dont specify any headers myself really.
Other than that, i noticed that the email never comes, not even in the trash or spam folder!
I thought of trying an existing php mail script but in the end, all of them use the same command to send the email.

I guess in the end its my only solution.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Not all of them use the same command in the end if you've configured them to use alternates, such as SMTP. Even mail() can do it, given the proper headers and your server not appearing in various blacklists or prey to various other filters.

Without the proper headers your emails will never reach users on many (web mail) servers.
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

You might want to contact your host as well. I know that there are sometimes issues sending from a server back to the same server. Some mysterious DNS voodoo or something I overheard my admin bitching about some time ago.
geodeath
Forum Newbie
Posts: 8
Joined: Wed Mar 28, 2007 7:38 pm

Post by geodeath »

hmmmm, which are the proper headers then?

Is there somewhere you can point me at so i can try that too?
I tried contacting the host, but they are soooooo slow. :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

geodeath wrote:hmmmm, which are the proper headers then?

Is there somewhere you can point me at so i can try that too?
I tried contacting the host, but they are soooooo slow. :)
http://www.swiftmailer.org/

Just use that. It's not as simple as just giving you a list of headers to use. The headers are really specific to what you're doing.
geodeath
Forum Newbie
Posts: 8
Joined: Wed Mar 28, 2007 7:38 pm

Post by geodeath »

Thanks!

That actually solved my problems.
The only thing i dont get is why i dont need
to provide username & password for the smtp server.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

It (your outgoing SMTP server) may not require authentication for sending emails, which isn't a good thing. Swiftmailer does allow you to specify a username and password, see the wiki.
Post Reply