Jump to content


Photo

PHP mail() and DNS Zones


  • Please log in to reply
5 replies to this topic

#1 TheDarkAvenger

TheDarkAvenger
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 01 April 2006 - 10:14 PM

I've been told this is quite hard...but please hear me out before you start running. I am hosted on a sub-domain and I want to be able to use the mail() function to send my users emails (obviously with their permission). However the emails are sent to their Junk Mail Box...and not everyone reads the notices and is smart enough to check in there and then complain about not receiving the email. I have searched and searched and searched all day and finally came up with the conclusion that I need to add an SPF record in my DNS zone file. The only problem is I don't know what the DNS zone is and how to configure/make/edit it...I do however understand what the SPF record is and how it affects the emails...


Can anyone shed some light on my problem,


Muchas Gracias,

Jordan

#2 steviewdr

steviewdr
  • Moderators
  • Advanced Member
  • 1,364 posts
  • LocationIreland

Posted 02 April 2006 - 02:06 PM

Hi,

yip - emails getting marked as spam = major problem.

Id suggest to setup your php.ini settings in a htaccess file to point to your own mail server that you use to relay the emails from your mail().

Get the idea?

Do a phpinfo() and see the current mail settings.
You can get a script also if you like to send emails via your SMTP server.

-steve

#3 TheDarkAvenger

TheDarkAvenger
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 02 April 2006 - 10:15 PM

Sorry if I sound like a complete newbie but I haven't had much experience with the htaccess file and php.ini... can you please explain what it is I am supposed to be changing in this file. Once again I appologise for my lack of understanding in this issue...


Thanks for your patience,

Jordan

#4 steviewdr

steviewdr
  • Moderators
  • Advanced Member
  • 1,364 posts
  • LocationIreland

Posted 03 April 2006 - 10:17 AM

If your using windows - then you can easily specific a SMTP server in php.ini or in a htaccess

In a .htaccess put

php_value SMTP yourisp_server.com

This *may* send you emails via this SMTP server and thus may not get marked as spam.

What Im now looking at is this tutorial:
[a href=\"http://www.phpfreaks.com/tutorials/130/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/130/0.php[/a]

Good Luck with it,
-steve

#5 redbullmarky

redbullmarky
  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 03 April 2006 - 11:16 AM

[!--quoteo(post=361172:date=Apr 3 2006, 11:17 AM:name=steviewdr)--][div class=\'quotetop\']QUOTE(steviewdr @ Apr 3 2006, 11:17 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
If your using windows - then you can easily specific a SMTP server in php.ini or in a htaccess

In a .htaccess put

php_value SMTP yourisp_server.com

This *may* send you emails via this SMTP server and thus may not get marked as spam.

What Im now looking at is this tutorial:
[a href=\"http://www.phpfreaks.com/tutorials/130/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/130/0.php[/a]

Good Luck with it,
-steve
[/quote]

i got a little help from reading this when i was working on a newsletter (with same problem): [a href=\"http://forums.whirlpool.net.au/forum-replies-archive.cfm/484996.html\" target=\"_blank\"]http://forums.whirlpool.net.au/forum-repli...cfm/484996.html[/a]

the problem can be the way you set your headers up that go into the mail() function. might be worth having a look at that too.

CHeers

"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#6 TheDarkAvenger

TheDarkAvenger
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 03 April 2006 - 06:45 PM

I am obviously too inexperienced with the whole SMTP an mail() stuff...at the moment I just can't do it...however i'll keep trying with the PHPMailer-Class and try to get it right as it keeps saying that ther was a problem sendng...

Anyway, thanks for your help!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users