Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

关于论坛邮件系统的说明

[复制链接]
1d2d3d 发表于 2006-3-21 21:56:41 | 显示全部楼层
由于服务器邮件系统配置不正确,邮件发送失败
回复

使用道具 举报

SLXGSY 发表于 2006-3-30 09:01:08 | 显示全部楼层
邮件不能发送的问题

以下是我的mail_config.inc配置


$mailsend = 2;                        // Sending type        0=do not send any mails
                                //                1=send via PHP mail() function and UNIX sendmail
                                //                2=send via Discuz! SMTP/ESMTP interface
                                //                3=send via PHP mail() and SMTP(only for win32, do not support ESMTP)

                                // 邮件发送方式        0=不发送任何邮件
                                //                1=通过 PHP 函数及 UNIX sendmail 发送(推荐此方式)
                                //                2=通过 SOCKET 连接 SMTP 服务器发送(支持 ESMTP 验证)
                                //                3=通过 PHP 函数 SMTP 发送 Email(仅 win32 下有效, 不支持 ESMTP)
                                //
                                // 可通过 utilities/testmail.php 测试您的系统支持哪种邮件发送方式

if($mailsend == 1) {

        // Send via PHP mail() and UNIX sendmail(no extra configuration)
        // 通过 PHP 函数及 UNIX sendmail 发信(无需配置)

} elseif($mailsend == 2) {        // send via Discuz! ESMTP interface
                                // 通过 Discuz! SMTP 模块发信

        $mailcfg['server'] = 'SMTP.163.COM';                        // SMTP host address
                                                                // SMTP 服务器

        $mailcfg['port'] = '25';                                // SMTP 端口, 默认不需修改
                                                                // SMTP port, leave default for most occations

        $mailcfg['auth'] = 1;                                        // require authentification? 1=yes, 0=no
                                                                // 是否需要 AUTH LOGIN 验证, 1=是, 0=否

        $mailcfg['from'] = '沃土家园 <votwo@163.com>';        // mail from (if authentification required, do use local email address of ESMTP server)
                                                                // 发信人地址 (如果需要验证,必须为本服务器地址)

        $mailcfg['auth_username'] = 'votwo';                // username for authentification
                                                                // 验证用户名

        $mailcfg['auth_password'] = '××××××;                        // password for authentification
                                
                                // 验证密码

我在自己电脑上调试时
选忘记密码  填上邮箱就能收到邮件
上传到空间上怎么都收不到
大家帮我看看
回复

使用道具 举报

a7148009 发表于 2006-3-31 05:36:41 | 显示全部楼层
hao  a
回复

使用道具 举报

暴雨冰滢 发表于 2006-4-1 13:38:07 | 显示全部楼层
发是能发了,但是我收到的是乱码邮件啊,我用的是126的邮箱
回复

使用道具 举报

天下第一神神 发表于 2006-5-21 23:19:37 | 显示全部楼层
原帖由 暴雨冰滢 于 2006-4-1 13:38 发表
发是能发了,但是我收到的是乱码邮件啊,我用的是126的邮箱



关注中。。我也有类似的问题
回复

使用道具 举报

dogboys 发表于 2006-6-11 23:34:57 | 显示全部楼层
我显示以下错误.....


Warning: stream_set_blocking(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 48

Warning: fgets(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 50

Warning: fputs(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 55

Warning: fgets(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 56

Warning: fgets(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 62

Warning: fputs(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 90

Warning: fgets(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 91

Warning: fputs(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 93

Warning: fgets(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 94

Warning: fputs(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 103

Warning: fgets(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 104

Warning: fputs(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 106

Warning: fgets(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 107

Warning: fputs(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 113

Warning: fgets(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 114

Warning: fputs(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 119

Warning: fputs(): supplied argument is not a valid stream resource in d:\usr\www\html\include\sendmail.inc.php on line 120

配置如下....

if($mailsend == 1) {

        // Send via PHP mail() and UNIX sendmail(no extra configuration)
        // 通过 PHP 函数及 UNIX sendmail 发信(无需配置)

} elseif($mailsend == 2) {        // send via Discuz! ESMTP interface
                                // 通过 Discuz! SMTP 模块发信

        $mailcfg['server'] = 'smtp.163.com';                        // SMTP host address
                                                                // SMTP 服务器

        $mailcfg['port'] = '25';                                // SMTP 端口, 默认不需修改
                                                                // SMTP port, leave default for most occations

        $mailcfg['auth'] = 1;                                        // require authentification? 1=yes, 0=no
                                                                // 是否需要 AUTH LOGIN 验证, 1=是, 0=否

        $mailcfg['from'] = 'TEST <gzvita@163.com>';        // mail from (if authentification required, do use local email address of ESMTP server)
                                                                // 发信人地址 (如果需要验证,必须为本服务器地址)

        $mailcfg['auth_username'] = 'gzvita';                // username for authentification
                                                                // 验证用户名

        $mailcfg['auth_password'] = '******';                        // password for authentification
                                                                // 验证密码

} elseif($mailsend == 3) {        // send via PHP mail() and SMTP(only for win32, do not support ESMTP)
                                // 通过 PHP 函数及 SMTP 服务器发信

        $mailcfg['server'] = 'smtp.your.com';                // SMTP host address
                                                        // SMTP 服务器

        $mailcfg['port'] = '25';                        // SMTP 端口, 默认不需修改
                                                        // SMTP port
回复

使用道具 举报

dogboys 发表于 2006-6-11 23:37:11 | 显示全部楼层
大家帮帮手啦.....
急啊...

sendmail.inc.php配置如下:

<?php

/*
        [Discuz!] (C)2001-2006 Comsenz Inc.
        This is NOT a freeware, use is subject to license terms

        $RCSfile: sendmail.inc.php,v $
        $Revision: 1.3 $
        $Date: 2006/02/23 13:44:02 $
*/

if(!defined('IN_DISCUZ')) {
        exit('Access Denied');
}

require_once DISCUZ_ROOT.'./mail_config.inc.php';
@include language('emails');

if($sendmail_silent) {
        error_reporting(0);
}

if(isset($language[$email_subject])) {
        eval("\$email_subject = \"".$language[$email_subject]."\";");
}
if(isset($language[$email_message])) {
        eval("\$email_message = \"".$language[$email_message]."\";");
}

$email_subject = str_replace("\r", '', str_replace("\n", '', $email_subject));
$email_message = str_replace("\r\n.", " \r\n..", str_replace("\n", "\r\n", str_replace("\r", "\n", str_replace("\r\n", "\n", str_replace("\n\r", "\r", $email_message)))));

if(!$email_from) {
        $email_from = "$bbname <$adminemail>";
}

if($mailsend == 1 && function_exists('mail')) {

        $email_message = str_replace("\r", '', $email_message);
        strpos($email_to, ',') ? @mail('Discuz! User <me@localhost>', $email_subject, $email_message, "From: $email_from\r\nBcc: $email_to") :
                @mail($email_to, $email_subject, $email_message, "From: $email_from");

} elseif($mailsend == 2) {

        if(!$fp = fsockopen($mailcfg['server'], $mailcfg['port'], $errno, $errstr, 30)) {
                errorlog('SMTP', "($mailcfg[server]mailcfg[port]) CONNECT - Unable to connect to the SMTP server, please check your \"mail_config.php\".", 0);
        }
        stream_set_blocking($fp, true);

        $lastmessage = fgets($fp, 512);
        if(substr($lastmessage, 0, 3) != '220') {
                errorlog('SMTP', "$mailcfg[server]mailcfg[port] CONNECT - $lastmessage", 0);
        }

        fputs($fp, ($mailcfg['auth'] ? 'EHLO' : 'HELO')." discuz\r\n");
        $lastmessage = fgets($fp, 512);
        if(substr($lastmessage, 0, 3) != 220 && substr($lastmessage, 0, 3) != 250) {
                errorlog('SMTP', "($mailcfg[server]mailcfg[port]) HELO/EHLO - $lastmessage", 0);
        }

        while(1) {
                $lastmessage = fgets($fp, 512);
                if(substr($lastmessage, 3, 1) != '-' || empty($lastmessage)) {
                        break;
                }
        }

        if($mailcfg['auth']) {
                fputs($fp, "AUTH LOGIN\r\n");
                $lastmessage = fgets($fp, 512);
                if(substr($lastmessage, 0, 3) != 334) {
                        errorlog('SMTP', "($mailcfg[server]:$mailcfg[port]) AUTH LOGIN - $lastmessage", 0);
                }

                fputs($fp, base64_encode($mailcfg['auth_username'])."\r\n");
                $lastmessage = fgets($fp, 512);
                if(substr($lastmessage, 0, 3) != 334) {
                        errorlog('SMTP', "($mailcfg[server]:$mailcfg[port]) USERNAME - $lastmessage", 0);
                }

                fputs($fp, base64_encode($mailcfg['auth_password'])."\r\n");
                $lastmessage = fgets($fp, 512);
                if(substr($lastmessage, 0, 3) != 235) {
                        errorlog('SMTP', "($mailcfg[server]:$mailcfg[port]) PASSWORD - $lastmessage", 0);
                }

                $email_from = $mailcfg['from'];
        }

        fputs($fp, "MAIL FROM: ".preg_replace("/.*\<(.+?)\>.*/", "\\1", $email_from)."\r\n");
        $lastmessage = fgets($fp, 512);
        if(substr($lastmessage, 0, 3) != 250) {
                fputs($fp, "MAIL FROM: <".preg_replace("/.*\<(.+?)\>.*/", "\\1", $email_from).">\r\n");
                $lastmessage = fgets($fp, 512);
                if(substr($lastmessage, 0, 3) != 250) {
                        errorlog('SMTP', "($mailcfg[server]:$mailcfg[port]) MAIL FROM - $lastmessage", 0);
                }
        }

        foreach(explode(',', $email_to) as $touser) {
                $touser = trim($touser);
                if($touser) {
                        fputs($fp, "RCPT TO: $touser\r\n");
                        $lastmessage = fgets($fp, 512);
                        if(substr($lastmessage, 0, 3) != 250) {
                                fputs($fp, "RCPT TO: <$touser>\r\n");
                                $lastmessage = fgets($fp, 512);
                                errorlog('SMTP', "($mailcfg[server]:$mailcfg[port]) RCPT TO - $lastmessage", 0);
                        }
                }
        }

        fputs($fp, "DATA\r\n");
        $lastmessage = fgets($fp, 512);
        if(substr($lastmessage, 0, 3) != 354) {
                errorlog('SMTP', "($mailcfg[server]:$mailcfg[port]) DATA - $lastmessage", 0);
        }

        fputs($fp, "To: $email_to\r\nFrom: $email_from\r\nSubject: ".str_replace("\n", ' ', $email_subject)."\r\n\r\n$email_message\r\n.\r\n");
        fputs($fp, "QUIT\r\n");

} elseif($mailsend == 3) {

        ini_set('SMTP', $mailcfg['server']);
        ini_set('smtp_port', $mailcfg['port']);
        ini_set('sendmail_from', $email_from);

        foreach(explode(',', $email_to) as $touser) {
                $touser = trim($touser);
                if($touser) {
                        @mail($touser, $email_subject, $email_message, "From: $email_from");
                }
        }

}

?>
回复

使用道具 举报

dogboys 发表于 2006-6-12 19:54:03 | 显示全部楼层
up
回复

使用道具 举报

hua668 发表于 2006-7-4 01:08:11 | 显示全部楼层
原帖由 暴雨冰滢 于 2006-4-1 13:38 发表
发是能发了,但是我收到的是乱码邮件啊,我用的是126的邮箱


我也一样!希望可以解决
回复

使用道具 举报

k80 发表于 2006-7-16 21:37:08 | 显示全部楼层
跟46楼一样错误提示,确定邮件配置无误,急求解决办法~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-2 10:22 , Processed in 0.102660 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表