<% 
on error resume next
if  mailsend="" then mailsend=webmail      
if  emailname="" then emailname=webceo     
if mailzj="0" then
	sendmsg="由于系统设置错误，给您邮箱发送的注册资料未成功。"
	
elseif mailzj="1" then
	Set objcdonts = Server.CreateObject("CDONTS.NewMail")
	objcdonts.From =mailsend                       
	objcdonts.To =emailto                          
	objcdonts.Subject =emailtopic                  
	objcdonts.BodyFormat = 0 
	objcdonts.MailFormat = 0 
	objcdonts.Body =emailbody                      
	objcdonts.Send
	Set objcdonts = Nothing	
	
elseif mailzj="2" then
	set Jmail=server.CreateObject ("Jmail.message")
        JMail.Charset="gb2312"
        'jMail.ContentType="text/html" 
	Jmail.Silent=true
	Jmail.fromname=emailname                       
	Jmail.from=mailsend                             
	Jmail.AddRecipient (emailto)                   
	Jmail.Subject= emailtopic                       
	Jmail.body=emailbody                            
        JMail.MailServerUserName =mailusername		
        JMail.MailServerPassWord =mailuserpass   	
        JMail.send(mailaddress)   	               
        JMail.Close()                                  

elseif mailzj="3" then
	Set mailer=Server.CreateObject("ASPMAIL.ASPMailCtrl.1")  
	recipient=emailto                               
	sender=mailsend                                
	subject=emailtopic                              
	message=emailbody                              
	mailserver=mailaddress                        
	result=mailer.SendMail(mailserver, recipient, sender, subject, message)
end if
	
if err then 
        SendMail=err.description
	err.clear
else
	SendMail="OK"
end if
%>

