#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    33
    Rep Power
    15
    I am using following code to send emails through automailer to register users of site. Email addresses of the users are stored in the database in variable $email, Newsletter contents is stored in variable $contents.
    mail() function is in while loop and receives email addresses and contents from database. Following is code i am using.
    mail( "$email", "Free News Letter", "$matter" , "From: webmaster@adc.com");
    This automailer sends emails to email addresses such as xyz@hotmail.com OR xyz@yahoo.com successfully. Email address such as xyz@domain.com could not receive mails through this. Can anybody suggest clue to solve the problem.
    Thanks

    [This message has been edited by aas (edited August 23, 2000).]
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    London, England
    Posts
    3
    Rep Power
    0
    I am having the same problem. Mail() sent out to some hosts works fine, and to others, nothing is sent at all. The CC and BCC fields have the same effects.

    Given than egress of mail occurs every time the command is used(I have a bcc address that receives a copy of every mail sent, and they look fine), could it be a fault in the command, or something to do with the setup of the mail server?

    If you hear of anything, let me know

    Thanks

    Richard
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Seattle, WA USA
    Posts
    23
    Rep Power
    0
    Can you e-mail the same people from the shell? It may be related to SendMail and reverse look-up. I think I had simular problems last year... I have the same code:

    Mail($MailTo,$MailSubject,$MailBody, "From: ".$MailFrom);

    And I haven't had any problems with it...


    Carl Sweetland
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    33
    Rep Power
    15
    Sorry, I have not used PHP from shell so far. Please guide me how to use it. So that I can try.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Seattle, WA USA
    Posts
    23
    Rep Power
    0
    When I was talking about from the shell...I was taking PHP out of the loop and checking if SendMail was having a problem with the e-mail address.

    At the command prompt type:

    mail name@domain.com [ENTER]
    Type in you subject line [ENTER]
    Type in your body [Control]+[D]
    Type in any Cc. [Control]+[D]

    This will send your basic e-mail from the shell. If it errors out then you have a problem with the e-mail address or Send Mail...



    ------------------
    ---------------------
    Carl Sweetland
    carl@sweetlands.com
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    33
    Rep Power
    15
    I have entered in command prompt as follows.

    [abc@abc aas.com]$ mail xyz@domain.com
    Subject: Test mail()
    test mail matter
    Cc: xyz@yahoo.com

    this has send eamil to xyz@yahoo.com but not to xyz@domain.com
    Please guide me solve problem.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Seattle, WA USA
    Posts
    23
    Rep Power
    0
    The server you are e-mailing to probably requires a reverse lookup (anti-spamming).

    Check to see if there is a reverse look-up in your domain's MX record on your host DNS.

    I can't profess to be an export in this arena...but I did have this simular problem when I was settign up SendMail.

    Good Luck :-)

    ------------------
    Carl Sweetland
    carl@sweetlands.com
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    33
    Rep Power
    15
    How can I change settings of the server I am emailing. I can change settins of my server.
    I tried with this also.

    [abc@abc aas.com]$ mail xyz@hotmail.com
    Subject: Test mail()
    test mail matter
    Cc: xyz@yahoo.com

    In this case it sends email to xyz@yahoo.com but not to xyz@hotmail.com.
  16. #9
  17. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Seattle, WA USA
    Posts
    23
    Rep Power
    0
    You can't change the server you are mailing to... The DNS record for your server's domain needs to have a MX record in it. That way when Hotmail confirms that your server actually send the message it has a way to point back to you.

    Talk to who ever is hosting your domain name (the domain of your mail server) and have them enter in a reverse lookup.

Similar Threads

  1. Uploading Files
    By vivekjain in forum ASP Programming
    Replies: 0
    Last Post: February 16th, 2004, 11:21 PM
  2. problem with my disable function...
    By bwedekin in forum HTML Programming
    Replies: 1
    Last Post: February 9th, 2004, 11:47 AM
  3. Replies: 1
    Last Post: February 8th, 2004, 01:59 PM
  4. database access using thread
    By padmini in forum Visual Basic Programming
    Replies: 3
    Last Post: February 6th, 2004, 12:38 AM
  5. Win32::API Help!!!
    By robbydooo in forum Perl Programming
    Replies: 5
    Last Post: February 2nd, 2004, 02:25 PM

IMN logo majestic logo threadwatch logo seochat tools logo