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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.