JMAIL Component Issues Compilation

Published: 2006-07-01

I. Jmail FAQ


1. What is the version of JMAIL?
JMAIL is free version 4.3

2. Does JMAIL need a separate outgoing mail server?
JMAIL requires a separate outgoing mail server to be configured
For example: set mail=server.CreateObject("jmail.SMTPMail")
mail.ServerAddress = "mail.domain.com"

3. Why does sending mail fail when using jmail?
The most likely reason is that the outgoing mail server you specified requires SMTP authentication, but you did not specify the SMTP username and password in the program. The specific code is:
set mail=CreateObject("jmail.Message")
mail.Charset ="gb2312"
mail.From ="from@west263.com"
mail.AddRecipient "to@west263.com"
mail.MailDomain="mail.west263.com"
mail.MailServerUserName = " from @west263.com"
mail.MailServerPassWord = "****"
mail.subject=”test”
mail.body= “Welcome”
'On Error Resume Next
mail.Send("mail.west263.com")
mail.close()
set mail=nothing

4. Can Jmail send attachments?
Yes
mail.AddAttachment (replace(server.MapPath("/test.doc"),"",""))

5. Can Jmail send Html format emails?
Yes, see the user manual for details.

6. Jmail component example.
(1) The outgoing mail server requires authentication.
'The following code is for an outgoing mail server that requires authentication, such as our mail server

<%


On Error Resume Next



' Import JMAIL component

Dim jmail

Set jmail = Server.CreateObject("JMAIL.Message")

 

' Set SMTP server information

' Make sure your mailbox has SMTP service enabled and that you have set a password or generated an authorization code

'jmail.Silent = true ' Silent mode, do not display error messages

'jmail.Logging = true ' Enable logging; you can view logs through the jmail.Log property

jmail.Charset = "utf-8" ' Set email character set

 

jmail.MailServerUserName = "xxx@xxxx.com" ' Your email username

jmail.MailServerPassword = "passwd" ' Your email password or authorization code

jmail.From = "xxx@xxxx.com" ' Email sender address

jmail.FromName = "Sender Name" ' Email sender name

jmail.AddRecipient "shouxinren@xxx.com" ' Email recipient address

jmail.Subject = "Email Subject" ' Email subject

jmail.Body = "Email Body" ' Email body

Response.Write("JMAIL version d: " & jmail.Version)

 

' Set SMTP server parameters

jmail.ServerAddress = "smtp.yunyou.top" ' Email SMTP server address

jmail.ServerPort = 25 ' Email SMTP server port; may be 465 or 587 or 25, depending on the mail server settings

jmail.SSL = true ' true enables SSL encryption, false disables SSL encryption

jmail.Authentication = true ' Enable SMTP authentication

 

' Send email

jmail.Send("smtp.yunyou.top")    ' Email SMTP server address

  

Response.Write("ok ")


' Clean up the mail object

Set jmail = Nothing

%>