need help: trouble with mail function....

Discussion in 'PHP' started by cuongdm, Dec 25, 2005.

  1. #1
    hi guys,
    i use function mail() from my website but it doesn't work as i expected.... emails (verification emails when people register) always go to BULK mail (Yahoo acc) at the first time, if i check to "Not Spam" the next time it will go to Inbox as i want... BUT, sure people don't have the will to find my emails in BULK and do like i did...
    I have another email acc that checked by OE, emails from my site can't go to this acc either....
    how can i do now?
    -------------
    thanks for any comments?
     
    cuongdm, Dec 25, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    What programming language are you using?
     
    digitalpoint, Dec 26, 2005 IP
  3. cuongdm

    cuongdm Peon

    Messages:
    68
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i'm using PHP...
     
    cuongdm, Dec 27, 2005 IP
  4. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It could be to do with the mail headers that you are sending (some servers get piky unless they get return paths etc), it's difficult to say unless you post the code.

    I use the following headers (which I have been told is overkill)

    $subject='email subject';
    $message="email message";
    $headers ="MIME-Version: 1.0\r\n";
    $headers .= "From: mailbot@".$_SERVER['SERVER_NAME']."\r\n";
    $headers .= "Return-Path: mailbot@".$_SERVER['SERVER_NAME']."\n";
    $headers .= "Reply-To: mailbot@".$_SERVER['SERVER_NAME']."\n";
    $headers .= "Message-Id: <".time()."@".$_SERVER['SERVER_NAME'].">\n";
    $headers .= "X-Mailer: php-mail-function-0.2\n";
    $to=$clean['email'].', ';
    mail($to, $subject,$message,$headers,"-fmailbot@".$_SERVER['SERVER_NAME']);
     
    stuw, Dec 27, 2005 IP
  5. blissallstar

    blissallstar Peon

    Messages:
    176
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Shared hosting or dedicated hosting account?

    It could be that if your on a shared host that the mail services your viewing the emails at thinks that the IP is associated with bulk emailer's. I had this happen to one of my sites. One of the other domain's on the VPS got blacklisted along with the servers IP and my site's newletters would go to the spam folders on sites like yahoo and wouldn't even go through on other sites.

    stuw code looks to be solid. I don't know about using the word bot in the @ field.
     
    blissallstar, Dec 28, 2005 IP
  6. MaxPowers

    MaxPowers Well-Known Member

    Messages:
    264
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    120
    #6
    Regardless of what you do, anti-spam filters and certain anti-spam services simply block emails or route them to the bulk folder. Some services require that your own mother verify her email address before she can email you.

    The best thing to do is offer a reminder to check their bulk folder and to whitelist your email address as they are sending you information (forms, etc.)

    And a hearty and ultra-sarcastic thank you to the spam-hounds who have ruined a perfectly good means of internet communication. then again... it must have worked or they wouldn't profit from it....
     
    MaxPowers, Dec 28, 2005 IP
  7. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sort of. It looks like way past overkill to me. Personally, if I saw that in my inbox, I'd mark it as spam. Then again, I get at least 300 non-spam emails a day. YMMV.

    I do. For anybody who's vaguely jaded, it automatically gets added to the spam filter. At least, that's what I do. I can't speak for anyone else.

    Then again, I'm probably adding to email spam just by posting to this thread. Must go iron my ears...
     
    jimrthy, Dec 28, 2005 IP
  8. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Why's that then?

    Point taken about bot@ - but others chan change that.

    I suspect that many people do not examine mail headers before deciding if something is spam or not - don't they just usually look at the subject line and the from address??

    I know some mail servers like to have some of the correct mail headers (more than you usually need to add to send email using mail() ) - and that's why the code is ott.
     
    stuw, Dec 30, 2005 IP
  9. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You know, I can't remember what I was thinking when I wrote that. I really have to quit logging into forums at 3 am (which I'm doing right now...bleh).

    I think you're right about sending good header fields.

    Sorry for the confusion.
     
    jimrthy, Dec 31, 2005 IP