Jump to content

using php email


simflex

Recommended Posts

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] = '[email protected]' ;

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");
}

Link to comment
https://forums.phpfreaks.com/topic/209855-using-php-email/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.