Jump to content
xisto Community
Sign in to follow this  
danagym

Php Send Email Problem need help

Recommended Posts

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
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

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
Problem with php mail() clientPhp Send Email Problem

Hi,

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.