birthday email

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

5 replies · 530 views · started 16 years ago · 1 min read

3 participants
nclemale36 Lead · 537 posts #1

anyone help me do this so users get sent an email when its there birthday .

i have added the email code from register to the birthday code in core but it does nowt.

can anyone help thanks,.

 if ($td!=$lbpm[0])
  {
    //echo "boo";
    $sql = "SELECT id, name, birthday  FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate())";
    $ppl = mysql_query($sql);
    while($mem = mysql_fetch_array($ppl))
    {
        $msg = "[card=008]to you $mem[1]"."[/card] $sitename team wish you a great day   .dont get too drunk and tell someone on wap u love them lmao (present)[br/](fireworks)[br/][small][i]p.s: this is an automated pm[/i][/small]";
        autopm($msg, $mem[0]);

$email = $_GET["email"];
$uid = $_GET["uid"];
$msg = "\n Username: ".$uid." happy birthday from  ".$sitename." ".$sitename."";
$subj = "Happy birthday ".$sitename."";
$headers = 'From: host@yoursite.com' . "\r\n" .
'Reply-To: host@yoursite.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subj, $msg, $headers);

    }
    mysql_query("UPDATE ibwf_settings SET value='".$td."' WHERE name='lastbpm'");
  }
  
}
something else Fellow · 2,296 posts #3

also $uid should be $mem[1] eg:

 if ($td!=$lbpm[0])
  {
    //echo "boo";
    $sql = "SELECT id, name, birthday, email  FROM ibwf_users where month(`birthday`) = month(curdate()) and dayofmonth(`birthday`) = dayofmonth(curdate())";
    $ppl = mysql_query($sql);
    while($mem = mysql_fetch_array($ppl))
    {
        $msg = "[card=008]to you $mem[1]"." Smell[/card] $sitename team wish you a great day   .dont get too drunk and tell someone on wap u love them lmao (present)[br/](fireworks)[br/][small]p.s: this is an automated pm[/small]";
        autopm($msg, $mem[0]);

$msg = "\n Username: ".$mem[1]." happy birthday from  ".$sitename." ".$sitename."";
$subj = "Happy birthday ".$sitename."";
$headers = 'From: host@yoursite.com' . "\r\n" .
'Reply-To: host@yoursite.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($mem[3], $subj, $msg, $headers);

    }
    mysql_query("UPDATE ibwf_settings SET value='".$td."' WHERE name='lastbpm'");
  }
  
}
nclemale36 Lead · 537 posts #4

cheers this works. but the person has to be online to get it. the reason i wanted to add this was to get ppl that havnt been online for a while back on the site by sending them a birthday wish from the site. is there a way of doing that ? ?

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close