SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trouble sending to Yahoo email accounts

    I've had real trouble with this for about a month now and I've nearly got my registration and verification sorted on my website. However, I've noticed that sending to Yahoo email accounts are not being received. Sending to gmail and other are fine. I'm using php's mail function. Now here's the strange thing, if I set the email address to something like this:

    Code:
    <?php
    $to = $email;
    
    mail($email,$subject,$email_message,$headers,"-f my@website.com");
    ?>
    it won't be received by Yahoo. This will be recieved:

    Code:
    <?php
    $to = 'myemail@yahoo.co.uk;
    
    mail($email,$subject,$email_message,$headers,"-f my@website.com");
    ?>
    Any ideas as to why it will be received by setting $to to a set email address rather than using a value from a variable? But email's have the same content.

  2. #2
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I think this code below is not working,
    $to = $email;

    because $email is empty?
    Quality codes are optimized and tested...
    Click here for inspiration..

  3. #3
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, $email is set with

    Code:
    $email = $_POST['email'];
    with some security.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,317
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    What's the purpose of the $to?

  5. #5
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The $to just holds the email address I'm sending to.

    It doesn't work if I put this either

    Code:
    mail($email,$subject,$email_message,$headers,"-f contact@website.com");


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •