Jump to content

Changing Password


Notoriouswow

Recommended Posts

On My Website I Devised A Password Changer Script, Although I Keep Getting This Error.

 

I Know Theres Some Directory I Have To Change Just Don't To What / Where It Is Located.

 

Hes My Error:

Warning: require_once(includes/phpmailer_include.php) [function.require-once]: failed to open stream: No such file or directory in C:\Fusion Arcemu 3.2.2\Server\htdocs\includes\sendmail_include.php on line 8

Fatal error: require_once() [function.require]: Failed opening required 'includes/phpmailer_include.php' (include_path='C:\Fusion Arcemu 3.2.2\Server\php\pear\') in C:\Fusion Arcemu 3.2.2\Server\htdocs\includes\sendmail_include.php on line 8

 

Here's My Code:

<?php
if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

function sendemail($toname,$toemail,$fromname,$fromemail,$subject,$message,$type="plain",$cc="",$bcc="") {

        global $settings, $locale;

        require_once INCLUDES."phpmailer_include.php";
        
        $mail = new PHPMailer();
        if (file_exists(INCLUDES."languages/phpmailer.lang-".$locale['phpmailer'].".php")) {
                $mail->SetLanguage($locale['phpmailer'], INCLUDES."language/");
        } else {
                $mail->SetLanguage("en", INCLUDES."language/");
        }

        if ($settings['smtp_host']=="") {
                $mail->IsMAIL();
        } else {
                $mail->IsSMTP();
                $mail->Host = $settings['smtp_host'];
                $mail->SMTPAuth = true;
                $mail->Username = $settings['smtp_username'];
                $mail->Password = $settings['smtp_password'];
        }
        
        $mail->CharSet = $locale['charset'];
        $mail->From = $fromemail;
        $mail->FromName = $fromname;
        $mail->AddAddress($toemail, $toname);
        $mail->AddReplyTo($fromemail, $fromname);
        if ($cc) { 
                $cc = explode(", ", $cc);
                foreach ($cc as $ccaddress) {
                        $mail->AddCC($ccaddress);
                }
        }
        if ($bcc) {
                $bcc = explode(", ", $bcc);
                foreach ($bcc as $bccaddress) {
                        $mail->AddBCC($bccaddress);
                }
        }
        if ($type == "plain") {
                $mail->IsHTML(false);
        } else {
                $mail->IsHTML(true);
        }
        
        $mail->Subject = $subject;
        $mail->Body = $message;
        
        if(!$mail->Send()) {
                $mail->ErrorInfo;
                $mail->ClearAllRecipients();
                $mail->ClearReplyTos();
                return false;
        } else {
                $mail->ClearAllRecipients(); 
                $mail->ClearReplyTos();
                return true;
        }

}
?>

Link to comment
https://forums.phpfreaks.com/topic/187630-changing-password/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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