forked from science-ation/science-ation
Add back the UTF8 database set names call, and switch all emails to use UTF8 encoding
This commit is contained in:
parent
d5ed8a1fc4
commit
4799b4ffd8
@ -100,6 +100,9 @@ if(!mysql_select_db($DBNAME))
|
||||
exit;
|
||||
}
|
||||
|
||||
//this will silently fail on mysql 4.x, but is needed on mysql5.x to ensure we're only using utf8 encodings
|
||||
@mysql_query("SET NAMES utf8");
|
||||
|
||||
//find out the fair year and any other 'year=0' configuration parameters (things that dont change as the years go on)
|
||||
$q=@mysql_query("SELECT * FROM config WHERE year='0'");
|
||||
|
||||
@ -1050,6 +1053,11 @@ require_once("Rmail/RFC822.php");
|
||||
//this sends out an all-ready-to-go email, it does no substitution or changes or database lookups or anything
|
||||
function email_send_new($to,$from,$subject,$body,$bodyhtml="") {
|
||||
$mail=new RMail();
|
||||
|
||||
$mail->setHeadCharset("UTF-8");
|
||||
$mail->setTextCharset("UTF-8");
|
||||
$mail->setHTMLCharset("UTF-8");
|
||||
|
||||
$mail->setFrom($from);
|
||||
$mail->setSubject($subject);
|
||||
$mail->setText($body);
|
||||
|
Loading…
x
Reference in New Issue
Block a user