simflex Posted August 5, 2010 Share Posted August 5, 2010 Hello again, Again, I as for your understanding if my question is too lame. In asp.net or classic ASP, you would need to specify ports, email domain etc before an email works. My research has not turned up similar process with php. For instance, the code below, when processed, throws an error about email address not being valid. I know the email address is but what is missing? Please have a look. Again, thanks to all very much. // Mail portion [b]$emailrcpt [/b] = 'myname@domainName.com' ; if ($mailevent==1) { $nobody = $emailrcpt ; if ($userlogin==1) { if (isset($_SESSION["login"])) { $nobody = $_SESSION["login"] ; } } $catquery = "select cat_name from ".$CAT_TB." where cat_id=$cat" ; $catresult = mysql_query($catquery); $catrow = mysql_fetch_object($catresult) ; $mailhead = translate("Date").": ".$bday." ".$mth[$bmonth]." ".$byear ; $mailhead = $mailhead."\r\n".translate("From").": " ; if ($time12hour==1) $mailhead = $mailhead.show12hour($stime) ; else $mailhead = $mailhead.$stime ; $mailhead = $mailhead." ".translate("To").": " ; if ($time12hour==1) $mailhead = $mailhead.show12hour($etime) ; else $mailhead = $mailhead.$etime ; $mailhead = $mailhead."\r\n".translate("Category").": ".stripslashes($catrow->cat_name) ; $mailhead = $mailhead."\r\n".translate("Event Title").": ".stripslashes(stripslashes($title)) ; $mailhead = $mailhead."\r\n".translate("Event Description").": \r\n\r\n" ; $mailhead = $mailhead."\r\n".translate("Location").": ".stripslashes(stripslashes($loc)) ; $maildesc = "\r\n\r\n".translate("Email").": ".$email ; $maildesc = $maildesc."\r\n".translate("More info").": ".$url ; // echo "<h3>".$mailhead."</h3>"; mail($emailrcpt, "Event updated - ".stripslashes(stripslashes($title))." (".$bday." ".$mth[$bmonth]." ".$byear.") ", $mailhead.stripslashes(stripslashes(str_replace("<br />","",$description))).$maildesc, "From: ".$nobody."\r\n" ."Reply-To: ".$nobody."\r\n"); } Quote Link to comment https://forums.phpfreaks.com/topic/209855-using-php-email/ Share on other sites More sharing options...
trq Posted August 5, 2010 Share Posted August 5, 2010 I don't see where $emailrcpt is defined. Quote Link to comment https://forums.phpfreaks.com/topic/209855-using-php-email/#findComment-1095415 Share on other sites More sharing options...
trq Posted August 5, 2010 Share Posted August 5, 2010 Sorry, now I do. Quote Link to comment https://forums.phpfreaks.com/topic/209855-using-php-email/#findComment-1095416 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.