danagym 0 Report post Posted January 19, 2005 I have a problem with send e-mail form!First it was designed only for name,email,subject and message entries!Now I need to add organisation and phone to be sent to my email!When I click the send button, it gives me that "mail" suposed to have 5 variables, and the message dont arrive!please help!here is a piece of code where is the error!======function SendEmailToUs(){//-------------------------------// Initialize variables //------------------------------- global $sFormErr; global $GAdmin_email; global $GEmails_subject; global $isSent; $sender_email = get_param("email"); $subject = get_param("subject"); $name = get_param("name"); $message = get_param("message"); $organization= get_param("organization"); $telefon= get_param("telefon"); if ($subject == "") $subject = $GEmails_subject; if(!strlen($name)) $sFormErr .= "Вы пропустили поле Имя.<br>"; if(!strlen($sender_email)) $sFormErr .= "Вы пропустили поле Email.<br>"; if(strlen($sender_email) &&( !validEmail( $sender_email )) ) $sFormErr .= "Вы написали ваш email неправильно!.<br>"; if(!strlen($message)) $sFormErr .= "Вы пропустили поле Сообщение.<br>"; if(!strlen($organization)) $sFormErr .= "Вы пропустили поле Организация.<br>"; if(!strlen($telefon)) $sFormErr .= "Вы пропустили поле телефон.<br>"; if(strlen($sFormErr)) return; >>>>> here is the problem>>> mail ($GAdmin_email, $name.": ".$subject, $telefon, $organization, $message, "From:$sender_email"); $isSent = 1;}=====thnaks!really need help guys!so what should I change in it, to work? Share this post Link to post Share on other sites
pixelsmack 0 Report post Posted January 23, 2005 mail ($GAdmin_email, $name.": ".$subject, $telefon, $organization, $message, "From:$sender_email"); I think the error lies in the way that the variables are being syntaxed, i think you can on ly have the 4 variaables in the argument. It might be easier to construct these outside the mail() argument.something like:$subject = $name . " : " . $subject;$message2 = $telfon . $organization . $message;$from = "From: " . $sender_email . "\r\n";mail ($GAdmin_email, $subject, $message2, $from); i know its a longer way round but it might work, i would also check in the php manual to make check how arguments can be parsed. Share this post Link to post Share on other sites
danagym 0 Report post Posted January 23, 2005 mail ($GAdmin_email, $name.": ".$subject, $telefon, $organization, $message, "From:$sender_email");I think the error lies in the way that the variables are being syntaxed, i think you can on ly have the 4 variaables in the argument. It might be easier to construct these outside the mail() argument. something like: $subject = $name . " : " . $subject;$message2 = $telfon . $organization . $message;$from = "From: " . $sender_email . "\r\n";mail ($GAdmin_email, $subject, $message2, $from); i know its a longer way round but it might work, i would also check in the php manual to make check how arguments can be parsed. <{POST_SNAPBACK}> thanks A lot!it is perfect to me!good luck! Share this post Link to post Share on other sites
iGuest 3 Report post Posted February 6, 2010 Problem with php mail() clientPhp Send Email ProblemHi, Just today my website start to send blank emails to every member. I'm using the php() mail client. Is there any answer for that. Hope they didn't hack my site. -question by Bart Share this post Link to post Share on other sites