+ Reply to Thread
Results 1 to 8 of 8

Thread: PHP send mail - Unable to send to Yahoo! email addresses

  1. #1
    royyuuki is offline x10Hosting Member royyuuki is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    Manila, Philippines
    Posts
    23

    PHP send mail - Unable to send to Yahoo! email addresses

    Hi everyone, I am having a problem sending an email to the following domains:
    • @yahoo.com,
    • @hotmail.com, and
    • @msn.com
    using the PHP mail() function. But there's no problem if I send an email to @gmail.com

    Is there something wrong with my code? Thank you so much.
    Code:
    <?php
    	$to = 'someone@yahoo.com';
    	$subject = 'Sample Subject';
    	$message = 'Hi. This is a sample message.';
    	$headers = 'From: webmaster@royyuuki.elementfx.com' . "\r\n" .
    	    'Reply-To: no-reply@royyuuki.elementfx.com' . "\r\n" .
    	    'X-Mailer: PHP/' . phpversion();
    
    	mail($to, $subject, $message, $headers);
    	echo("Message sent!");
    ?>

  2. #2
    Twinkie is offline Banned Twinkie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ft. Lauderdale, Florida
    Posts
    1,389

    Re: PHP send mail - Unable to send to Yahoo! email addresses

    The mail() function returns true or false depending on whether the mail was accepted for delivery.
    PHP Code:
    <?php
        $to 
    'someone@yahoo.com';
        
    $subject 'Sample Subject';
        
    $message 'Hi. This is a sample message.';
        
    $headers 'From: webmaster@royyuuki.elementfx.com' "\r\n" .
            
    'Reply-To: no-reply@royyuuki.elementfx.com' "\r\n" .
            
    'X-Mailer: PHP/' phpversion();

        echo (
    mail($to$subject$message$headers)) ? 'Message sent!' 'Message not sent!';
    ?>
    Post back your results.

    I recommend you check your spam folder at those addresses. I have heard that mail sent from the free servers due to the amount of abuse goes directly to spam.
    Last edited by Twinkie; 02-20-2010 at 03:39 PM.

  3. #3
    royyuuki is offline x10Hosting Member royyuuki is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    Manila, Philippines
    Posts
    23

    Re: PHP send mail - Unable to send to Yahoo! email addresses

    I tried to execute the code below:
    Code:
    <?php
        $to = 'royyuuki@yahoo.com';
        $subject = 'Sample Subject';
        $message = 'Hi. This is a sample message.';
        $headers = 'From: webmaster@royyuuki.elementfx.com' . "\r\n" .
            'Reply-To: no-reply@royyuuki.elementfx.com' . "\r\n" .
            'X-Mailer: PHP/' . phpversion();
    
        echo (mail($to, $subject, $message, $headers)) ? 'Message sent!' : 'Message not sent!';
    ?>
    and got the following result:
    Message sent!

    and I also tried to check my inbox, and it's there!
    Holy JESUS, are you some kind of like an angel or something?

    What happened? I can't believe this. Hahaha, :nuts: ...
    Thank you so much!! Now I can update my website and accept any email addresses.

    Whew! :drool:

  4. #4
    royyuuki is offline x10Hosting Member royyuuki is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    Manila, Philippines
    Posts
    23

    Re: PHP send mail - Unable to send to Yahoo! email addresses

    What's going on? I was able to send email messages to any @yahoo.com email addresses, but right now.. it's not working again.

  5. #5
    royyuuki is offline x10Hosting Member royyuuki is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    Manila, Philippines
    Posts
    23

    Re: PHP send mail - Unable to send to Yahoo! email addresses

    When I first registered here at x10hosting.com, I wasn't able to send email messages to all email addresses but @gmail.com .. that's why I required everyone who's going to register on my website to have a gmail account. it's a must.

    and then, i tried posting the problem here, and twinkie tried to help me by reproducing the issue.
    amazingly, the problem didn't arise for some weird reason. i was able to send an email to @gmail.com, @yahoo.com, and @msn.com ...

    but as of the moment, i can't send to @yahoo.com ... i also checked the spam folder, but the mail isn't there.

    @msn.com , and @gmail.com is working perfectly just now.....


    can someone please confirm this issue? is there something wrong with my header?

  6. #6
    royyuuki is offline x10Hosting Member royyuuki is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    Manila, Philippines
    Posts
    23

    Re: PHP send mail - Unable to send to Yahoo! email addresses

    When I first registered here at x10hosting.com, I wasn't able to send email messages to all email addresses but @gmail.com .. that's why I required everyone who's going to register on my website to have a gmail account. it's a must.

    and then, i tried posting the problem here, and twinkie tried to help me by reproducing the issue.
    amazingly, the problem didn't arise for some weird reason. i was able to send an email to @gmail.com, @yahoo.com, and @msn.com ...

    but as of the moment, i can't send to @yahoo.com ... i also checked the spam folder, but the mail isn't there.

    @msn.com , and @gmail.com is working perfectly just now.....


    can someone please confirm this issue? is there something wrong with my header?


    here's my code:

    PHP Code:
    <?php
        $to 
    'myemailadd@yahoo.com';
        
    $subject 'Sample Subject';
        
    $message 'Hi. This is a sample message.';
        
    $headers 'From: webmaster@royyuuki.elementfx.com' "\r\n" .
            
    'Reply-To: no-reply@royyuuki.elementfx.com' "\r\n" .
            
    'X-Mailer: PHP/' phpversion();

        echo (
    mail($to$subject$message$headers)) ? 'Message sent!' 'Message not sent!';
    ?>

    and i got "Message sent!"

  7. #7
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: PHP send mail - Unable to send to Yahoo! email addresses

    you may want to try sending the mail some way other than the PHP mail function. PHPMailer is a good SMTP/POP library for PHP...

  8. #8
    royyuuki is offline x10Hosting Member royyuuki is an unknown quantity at this point
    Join Date
    Dec 2009
    Location
    Manila, Philippines
    Posts
    23

    Re: PHP send mail - Unable to send to Yahoo! email addresses

    Quote Originally Posted by kbjradmin View Post
    you may want to try sending the mail some way other than the PHP mail function. PHPMailer is a good SMTP/POP library for PHP...
    Thank you so much for your response. I'll try to use that library.

+ Reply to Thread

Similar Threads

  1. Profiting from “Unsolicited Email Marketing”
    By arkad in forum Earning Money
    Replies: 0
    Last Post: 11-18-2008, 12:43 AM
  2. Send mail with PHP
    By messa in forum Free Hosting
    Replies: 2
    Last Post: 09-11-2008, 05:12 AM
  3. Replies: 3
    Last Post: 03-10-2008, 01:22 PM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers