Joke Collection Website - Blessing messages - How to notify website news in time

How to notify website news in time

This is easy to solve. Let's take the dedecms site as an example:

Adding members' messages to dedecms, that is, sending emails to administrators, will greatly facilitate webmasters to manage their own websites. This is mainly using the built-in email mail.class.php of Weaving Dreams, which is very simple.

1. First of all, we should make good preparations.

System Settings-System Basic Parameters-Core Settings, in which:

E-mail from websites such as zuimoban@qq.com.

Smtp server: such as smtp.qq.com.

The user mailbox of SMTP server is :zuimoban@qq.com.

User account of SMTP server: 00000

User password of SMTP server: you know.

Only when these items are filled in correctly can you send the letter. If you really can't get the letter, please go to the mailbox operator's website to inquire about SMTP related help information.

2. Open the plus/guestbook.php file and find the following location:

Otherwise {

ShowMsg ('The message has been submitted successfully, but it needs to be reviewed by the administrator before it can be displayed!' ,' guestbook.php ',0,3000);

}

//Add code here. .

exit();

}

//Show all messages

3. Insert the code into the insertion position:

//Send an email

$ mailaddress = $ cfg _ adminemail

$mailtitle=' user'. $uname。 Publish a message through the website message board';

$ message = $ msg

$mailbody = "User:". $ uname。 " < br/>; Tel: {$ tel} & ltbr/>; Address: {$ address} < br/& gt;; Email: {$ email} < br/& gt;; QQ:{ $ QQ } & lt; br/>; Message content:

$headers = "From:"。 $cfg_adminemail。 \ r \ Copy to. $ cfg _ adminemail

if($ CFG _ sendmail _ bys MTP = = ' Y ' & amp; & amp! Empty ($cfg_smtp_server))

{

$ mailtype = ' HTML

require_once(DEDEINC ./mail . class . PHP ');

$smtp = newsmtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$ CFG _ SMTP _ password);

$ SMTP-& gt; debug = false

$ SMTP-& gt; sendmail($mailaddress,$cfg_smtp_usermail,$mailtitle,$mailbody,$ mail type);

}

other

{

@mail($mailaddress,$mailtitle,$mailbody,$ headers);

}

//End of sending email