Results 1 to 4 of 4

Thread: mail() function not mailing.

  1. #1
    Join Date
    Mar 2009
    Fortaleza, CE, Brazil

    mail() function not mailing.

    Hello there, dudes!!

    Well, I've got a problem: I'm using a form to send emails to a mailbox using mail(), but they're not arriving.

    I'm sure that the mailbox exists, and that the function mail() returns true, that is, the e-mail was supposedly sent. Also, if I use my gmail account as addressee, the message arrives normally.

    Do you have any idea of why it's not arriving?

    Though I think it's irrelevant, here's the code, take a look:
    PHP Code:
    if(mail($para,"Talk to Us - $nome",$msg,$headers)){
    mail($email,"Talk to Us - $nome_cliente",$msg2,$headers2);
                alert('<?php echo $nome ;?>, your message was sent.');
    }else{ ?>
                alert('<?php echo $nome ;?>, sorry, your message could not be sent.');
    Last edited by Granite; 04-28-2009 at 08:19 AM.

  2. #2
    Join Date
    Jul 2006
    I seem to be having a similar problem so if somebody could help us both that would be great.

    I have form information written to a DB and e-mailed to me. Both always worked in the past but about a month ago I stopped getting the e-mails. It still puts the information into the DB. I didn't change any code so I'm not sure what's wrong. Here it is anyway:

    	mysql_query("INSERT INTO contacts
    	(name, email, site, inq, comments) VALUES('$name', '$email', '$site', '$inq', '$comments') ") 
    	or die(mysql_error());  
    	$msg = "A new entry has been added to your form";
    	$msg .= "\n-----------------------------------\n"; 
    	$msg .= "Name: $name\n"; 
    	$msg .= "Email: $email\n"; 
    	$msg .= "Website: $site\n";
    	$msg .= "Reason: $inq\n"; 
    	$msg .= "Comment: $comments\n";
    	mail ("myemail@gmail.com", "New Entry", $msg); 

  3. #3
    Join Date
    Feb 2009
    Try to on Check Which PHP Error you are getting when you are tying to send the email.

    try if(mail()) and then try to cath the error number

    LG GC 900 Viewty 2 exposed

  4. #4
    Join Date
    Jan 2009
    You can also check to see if the sending email server has been blacklisted. Some freemail accounts (hotmail, yahoo, etc) automatically block incoming emails originating from dynamic IP blocks or those identified as spammers in spam block lists.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles