September 5, 200718 yr I am working on a form and it is working well, but when try to add the following line: $mailto .= .$sub_email. ; it is not working right because what I am trying to do is for the person who had submitted the form to get a copy of their submittion. Advance thanks. I am using php code as follows: <?php $mailto = '[email protected]' . ', ' ; $mailto .= .$sub_email. ; $subject="E-mail Page"; $formurl="formula.php"; $errorurl="mailerror.php"; $thankyouurl="ThankYou.php"; $YES = $_POST[YES]; $Name = $_POST[Name]; $sub_email = $_POST[sub_email]; $Phone = $_POST[Phone]; $Mailing_address = $_POST[mailing_address]; $City = $_POST[City]; $State = $_POST[state]; $Zip_Code = $_POST[Zip_Code]; $messagetext = 'Email Testing'; mail($mailto, $subject, $messagetext, "From: "$Name" <$email>nReply-To: "$sub_email" <$email>nXMailer: chfeedback.php 2.01"); header("Location: $thankyouurl"); exit; ?>
September 5, 200718 yr php2005, As far as I know, the line should read $mailto .= $sub_email; enclosing the variable name in the '.' concatenation operator appears to be incorrect. Later in the code, the indexes into the $_POST array are not enclosed in quotes. This would be correct if those are constants, but... Regards, Don
September 6, 200718 yr Author Don, Thank you for the help. It did work but for some reason the e-mail only comes to me if I use the in house e-mail account. For example in my web form I type [email protected] at the field $sub_email I do not get any e-mail at my yahoo account, but if in case I type the inhouse e-mail account at $sub_email it will show at my e-mail account. Do you have any idea what can be the problem? thank you
September 6, 200718 yr php2005, So, if you enter a your inhouse email at $sub_email so that $mailto becomes [email protected], [email protected] you will receive two emails. If you only receive one, then the problem is with concatenating the second address; but if you provide values so that $mailto becomes [email protected], [email protected] you only receive mail at scm1m2m3? I'm not sure what could be going on here. These are some thoughts: Are you certain the 2nd address is working and is correct. Try a 3rd address. If you put the second address in $mailto all by itself does it work? What happens if you assign values so that $mailto becomes [email protected], [email protected] ? regards, Don
September 6, 200718 yr Author I did try to use an hotmail, gmail, or yahoo e-mail account and none of them went to my account. I did try also to use $mailto='[email protected]' and did not work. I tried also but didn't work. $foo='[email protected]'; $mailto=$foo; any idea?
September 6, 200718 yr Author I also tried to use $mailto ="inhouse email account".','.$sub_email; but only went to the inhouse e-mail account and not to the yahoo account
September 6, 200718 yr If you send to [email protected], [email protected] do you get two messages? Don
September 6, 200718 yr Assuming you DO get two message in the last example, it sounds a bit like there is some problem sending mail to domains other than your inhouse domain. This is not an area I'm knowledgeable in. Do you have an inhouse IT department that manages your servers? They may be able to explain why you can send to your local domain and not an external domain. Regards, Don
September 6, 200718 yr well, i guess the one message thing is no problem. I tested here and get the same result to a dup address. I'm thinking its a problem with the server being able to handle external email addresses. Sorry I couldn't be more help Regards, Don
Create an account or sign in to comment