Jmail 4.3发送附件乱码
用Jmail 4.3发邮件成功,发送附也能通过,用outlook收到的邮件没有附件,正方有十分十分多的乱码,应该那些乱码就是附件了,请问是什么原因和如何解决呢?
Dim email As New jmail.Message
email.Logging = True
email.Silent = True
email.Charset = "gb2312" '简体中文
email.ContentType = "text/html"
If CheckBox1.Checked = True Then
email.MailServerUserName = "guest@mimi-yuyu.com" 'smtp服务器用户名 系统
email.MailServerPassWord = "guest" 'smtp服务器密码 系统
email.From = "guest@mimi-yuyu.com" '发件人 系统
Else
email.MailServerUserName = Trim(TextBox1.Text) 'smtp服务器用户名
email.MailServerPassWord = Password1.Value 'smtp服务器密码
Dim strFjr As String = Trim(TextBox1.Text)
Dim strYm As String = Trim(TextBox6.Text)
email.From = strFjr & "@" & strYm '发件人
End If
email.Priority = 2 '级别
email.Subject = Trim(TextBox3.Text) '标题
email.Body = TEXTAREA1.InnerText 'body
email.AddRecipient(TextBox5.Text) '加入收件人
'邮件服务器付值
Dim strServer As String
If CheckBox1.Checked = True Then
strServer = "smtp.mimi-yuyu.com"
Else
strServer = "smtp." & Trim(TextBox6.Text)
End If
'加上附件
'If Emailfile.Value <> "" Then
'email.AddAttachment(Emailfile.Value)
email.AddAttachment("E:aa.txt", True, "txt")
'End If
'开始发送
If email.Send(strServer) Then
If CheckBox1.Checked = True Then
Label1.Text = "用系统邮箱成功发到" & Trim(TextBox5.Text)
Else
Label1.Text = "用" & TextBox1.Text & "@" & TextBox6.Text & "成功发送到" & TextBox5.Text
End If
TextBox1.Text = ""
TextBox6.Text = ""
TextBox5.Text = ""
TextBox3.Text = ""
TEXTAREA1.InnerText = ""
Else
If CheckBox1.Checked = True Then
Label1.Text = "用系统邮箱发送失败"
Else
Label1.Text = "用" & TextBox1.Text & "发送失败,可能用户名或密码错误,或邮件太大,可试用系统默认邮箱发送"
End If
End If
email = Nothing
End Sub