| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | Np$ 50 for resolving issue. keep getting this error message: Warning: mail(): SMTP server response: 554 Error: no valid recipients in e:\domains\c\cheap-florida-holiday.com\user\htdocs\email.php on line 25 anyone help me? Np$ 50 for resolving issue. cheers
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
| | #3 (permalink) |
| NamePros Regular | the problem is this is a .php page that calls three other .php pages. so not quite sure what page to paste. what do you think?
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
| | #5 (permalink) |
| New Member | Can u send me the email.php , the error code seem like authentication issue. my email is andychang21@gmail.com |
| |
| | #6 (permalink) |
| NamePros Regular | hi, ths is the email.php <? require_once("conn.php"); require_once("includes.php"); //get the agent info $q1 = "select * from re2_agents where AgentID = '$_GET[AgentID]' "; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); if(isset($_POST[s1])) { $to = $a1[email]; $subject = $_POST[subject]; $message = $_POST[message]; $message .= "\n\nProperty:\n$site_url/info.php?id=$_GET[ListingID]\n\n"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_POST[u_name] <$_POST[u_email]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; mail($to, $subject, $message, $headers); $thankyou = "<center><b><br><br><br>Thank you for your message!<br><br><a class=RedLink href=\"$site_url/info.php?id=$_GET[ListingID]\">back to the property details</a></center>"; //get the templates require_once("templates/HeaderTemplate.php"); require_once("templates/EmailThankyouTemplate.php"); require_once("templates/FooterTemplate.php"); } $AgentName = "$a1[FirstName] $a1[LastName]"; if(!empty($_GET[ListingID])) { $SubjectLine = "Property ID $_GET[ListingID]"; } //get the templates require_once("templates/HeaderTemplate.php"); require_once("templates/EmailTemplate.php"); require_once("templates/FooterTemplate.php"); ?> this is the emailtemplate.php what the above code request. <script> function CheckMail() { if(document.je.u_name.value=="") { alert('Enter your name, please!'); document.je.u_name.focus(); return false; } if(document.je.u_email.value=="") { alert('Enter your email, please!'); document.je.u_email.focus(); return false; } if(document.je.subject.value=="") { alert('Enter the subject, please!'); document.je.subject.focus(); return false; } if(document.je.message.value=="") { alert('Enter your message, please!'); document.je.message.focus(); return false; } } </script> <br><br> <form method=post onsubmit="return CheckMail();" name=je> <table width=340 align=center border=0> <caption align=center><span style="font-size:11; font-family:verdana; color:black; font-weight:bold">Use this form to contact <?=$AgentName?></span></caption> <tr> <td>Name:</td> <td><input type=text name="u_name" size=42 class="mtext"></td> </tr> <tr> <td>Email:</td> <td><input type=text name=u_email size=42 class="mtext"></td> </tr> <tr> <td>Subject:</td> <td><input type=text name=subject size=42 class="mtext" value="<?=$SubjectLine?>"></td> </tr> <tr> <td valign=top>Message:</td> <td><textarea rows=6 cols=41 name=message class="mtext"><?=$_POST[message]?></textarea></td> </tr> <tr> <td> </td> <td> <input type=submit name=s1 value="Send" class="sub1"> </td> </tr> </table> </form>
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more Last edited by fried-chicken; 05-17-2006 at 03:06 AM. |
| |
| | #7 (permalink) |
| Senior Member | it is possible that the email is not valid. Try echoing out $q1, and put it into phpmyadmin to see if anything gets returned. If nothing gets returned, it's your query's problem, and not the mail code or anything.
__________________ ----------------------------------------------------- |-----FREE BANNER EXCHANGE! 1:1 RATIO!!!!-----| |-------------www.bannercenter.info-------------| ----------------------------------------------------- |
| |
| | #8 (permalink) |
| NamePros Regular | yeah i'll give it a go. any chance you can explain clearer, never touch script codes before. cheers
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
| | #9 (permalink) |
| Senior Member | ok, never mind, let me try a different approach. After $a1 = mysql_fetch_array($r1);, but echo $a1[email]; if it returns a blank, there's a problem with your query. if it returns an email, I'll have to think a little bit longer. is this ok with you?
__________________ ----------------------------------------------------- |-----FREE BANNER EXCHANGE! 1:1 RATIO!!!!-----| |-------------www.bannercenter.info-------------| ----------------------------------------------------- |
| |
| | #11 (permalink) |
| Senior Member | ^ yes, I was also about to suggest that. I normally use single quotes though, ' .
__________________ ----------------------------------------------------- |-----FREE BANNER EXCHANGE! 1:1 RATIO!!!!-----| |-------------www.bannercenter.info-------------| ----------------------------------------------------- |
| |
| | #12 (permalink) |
| NamePros Regular | EDITED like suggestions no joy. did i put it in the right place? ------------------------------- <? require_once("conn.php"); require_once("includes.php"); //get the agent info $q1 = "select * from re2_agents where AgentID = '$_GET[AgentID]' "; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); echo $a1[email]; if(isset($_POST[s1])) { $to = $a1[email]; $subject = $_POST[subject]; $message = $_POST[message]; $message .= "\n\nProperty:\n$site_url/info.php?id=$_GET[ListingID]\n\n"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_POST[u_name] <$_POST[u_email]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; mail($to, $subject, $message, $headers); $thankyou = "<center><b><br><br><br>Thank you for your message!<br><br><a class=RedLink href=\"$site_url/info.php?id=$_GET[ListingID]\">back to the property details</a></center>"; ----------------- tried with and with out " " and ' ' around [mail]
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
| | #13 (permalink) |
| Senior Member | did you do '[mail]' or ['mail']? o yea, and what did it output? anything new?
__________________ ----------------------------------------------------- |-----FREE BANNER EXCHANGE! 1:1 RATIO!!!!-----| |-------------www.bannercenter.info-------------| ----------------------------------------------------- |
| |
| | #14 (permalink) |
| NamePros Regular | hi i did ['mail'] it change to Warning: mail(): SMTP server response: 554 Error: no valid recipients in e:\domains\c\cheap-florida-holiday.com\user\htdocs\email.php on line 27 the line error moved dome to line 27
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
| | #15 (permalink) |
| Senior Member | ok, yea, that didn't change... just to make sure, comment out the line that says mail($to, ...etc...). just put // in front of it, and change echo $a1[email]; to echo $a1['email'].
__________________ ----------------------------------------------------- |-----FREE BANNER EXCHANGE! 1:1 RATIO!!!!-----| |-------------www.bannercenter.info-------------| ----------------------------------------------------- |
| |
| | #16 (permalink) | |
| Soon to be RICHdoggie! | Quote:
where you have PHP Code: PHP Code: | |
| |
| | #17 (permalink) |
| NamePros Regular | hi, done the changes you both said. the change suggested by "poordoogie" ------------------------------------------ now as soon as you go on to the contacts page it reads "something wrong" in the top right hand corner. without trying to use the formtomail. once used it come up with a similar error as before. the change suggested by "anzchong91" --------------------------------------- gives "Parse error: parse error, unexpected T_IF, expecting ',' or ';' in e:\domains\c\cheap-florida-holiday.com\user\htdocs\email.php on line 13" by going to the contact page and not trying to use the formtomail. nothing else loads on the page. script still on "anzchong91" suggestion, result can be seen at www.cheap-florida-holiday.com/email.php
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
| | #18 (permalink) |
| NamePros Regular | PHP Code: |
| |
| | #19 (permalink) |
| NamePros Regular | hi, cvxdes. just tried your suggestion. the page loads fine, but when you presss send in the form a small " error " comes up in the top left corner. cheers
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
| | #22 (permalink) |
| NPQ's PA, Slave, and On Call Coder Technical Services | Made a few changes: PHP Code:
__________________ |
| |
| | #23 (permalink) | |
| Soon to be RICHdoggie! | Quote:
so if I were to do @mysql_query($sql) it wouldn't come up with lines of unintelligible text about me having an "error in [my] mysql syntax"?Great, thanks. Back to the thread Tom | |
| |
| | #24 (permalink) |
| NamePros Regular | i keep getting this error now on page load. Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in e:\domains\c\cheap-florida-holiday.com\user\htdocs\email.php on line 33
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
| | #25 (permalink) |
| NamePros Regular | bump
__________________ I know how to get FREE domains. Visit EARNMORE.BIZ and download my FREE ebook to learn more |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |