![]() ![]() |
Dec 25 2004, 06:08 AM
Post
#1
|
|
![]() CuteHack: Core Coder ![]() ![]() ![]() Group: Support Posts: 748 Joined: 21-November 04 From: Reno, NV Member No.: 1,748 |
open functions.inc.php (inc folder)
find (bottom line): CODE ?> add above: CODE //////////////////////////////////////////////////////// // Function: cute_mail Version: 1.0 // Description: Send mail with cutenews function cute_mail($to,$subject,$message){ // PHP Mail Headers // http://us2.php.net/manual/en/function.mail.php if (!isset($config_mail_admin_address) || $config_mail_admin_address == "") { $mail_from = "webmaster@".str_replace("www.","",$_SERVER['SERVER_NAME']); } else { $mail_from = $config_mail_admin_address; } $mail_headers = ""; $mail_headers .= "From: $mail_from\n"; $mail_headers .= "Reply-to: $mail_from\n"; $mail_headers .= "Return-Path: $mail_from\n"; $mail_headers .= "Message-ID: <" . md5(uniqid(time())) . "@" . $_SERVER['SERVER_NAME'] . ">\n"; $mail_headers .= "MIME-Version: 1.0\n"; $mail_headers .= "Content-type: text/plain; charset=US-ASCII\n"; $mail_headers .= "Content-transfer-encoding: 7bit\n"; $mail_headers .= "Date: " . date('r', time()) . "\n"; $mail_headers .= "X-Priority: 3\n"; $mail_headers .= "X-MSMail-Priority: Normal\n"; $mail_headers .= "X-Mailer: PHP\n"; $mail_headers .= "X-MimeOLE: Produced By CuteNews\n"; mail($to,$subject,$message,$mail_headers) or die("Can not send mail."); } open options.mdu (inc folder) find: CODE echo" <input type=hidden name=mod value=options> <input type=hidden name=action value=dosavesyscon>". add above: CODE showRow("Admin Email", "used as sender of mail, if blank mail will be from webmaster@yourdomain", "<input type=text style=\"text-align: center;\" name='save_con[mail_admin_address]' value='$config_mail_admin_address' size=40>"); After Uploading: go to the system config page (under options in the script) and set the admin email address (or leave it blank) just make sure you click save (blank or not) so it creates the variable in the config this will be used for register.php, lostpass.php, and the "author recieves email when someone comments on their post" hack in general it's freaking useful, in the future it might include smtp support (if anyone wants to help me out with that) This post has been edited by (lKj): Nov 30 2010, 04:18 PM -------------------- CuteHack: One Last Time!
|
|
|
|
| *guest |
Jan 5 2005, 01:15 AM
Post
#2
|
|
Guests |
I added this to my site but I dont see anyway to send mail.....
|
|
|
|
Jan 5 2005, 03:36 AM
Post
#3
|
|
![]() CuteHack: Core Coder ![]() ![]() ![]() Group: Support Posts: 748 Joined: 21-November 04 From: Reno, NV Member No.: 1,748 |
this hack is just a function used by other hacks i have made - look for them
-------------------- CuteHack: One Last Time!
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 04:51 AM |