We help IT Professionals succeed at work.

Jmail - Failed to email... How do i find out the reason to cause the eamil function failure?

LeanMoreTryMore
on
664 Views
Last Modified: 2008-01-09
I'm using Jmail to sending e-mail.
I thought Jmail is mail server product I dont know why after our mail server, Microsoft exchange mail server is upgraded, the mail function using Jmail is no longer working anymore. It just returns failure.

I use the following syntax to send email. How do i capture the error message...


JMail.Body = "My email body"            
JMail.Priority = 3;
 if ( JMail.Execute() ) {           <=== always failed but dont why
   JMail.Close()
   return "Completed";
 }
 else {
   return "Failure";
}        
Comment
Watch Question

Commented:
Hi:

on error resume next
jmail.Logging=true
jmail.Silent=false
response.write jmail.log

you can see the detail error message

Commented:
BTW,
you can try add the properties
jmail.from ="XXX@XXX.com" 'fill up an email address

thanks

Author

Commented:
Thanks.
Changed as advised. but I can't find the jmail.log
I got the following error when run the form

jmail.SMTPMail (0x8000FFFF)
The message was undeliverable. All servers failed to receive the message


JMail = Server.CreateObject("JMail.SMTPMail");
JMail.Silent = false;
JMail.Logging = true;
JMail.ServerAddress = mailSerever;
JMail.Sender = sendFrom;
Response.write(JMail.log);
JMail.Subject = "Jmail Test";
JMail.AddRecipient(sendTo);
JMail.Body = emailContent;            
JMail.Priority = 3;
if ( JMail.Execute() ) {
   JMail.Close()
   return "Completed";
}
else {
   return "Failure";
}
JMail.Close()


============================================================================

Commented:
hi:

you can add the properties
jmail.from ="xxx@XXX.xxx"

or check your exchange server ensure open relay for your web server.

the easy way to slove this problme ,you can install smtp service on web server,and
use

JMail.ServerAddress = Request.ServerVariables("local_addr")

thanks

Author

Commented:
can i download the smtp service from somewhere so i can install on my pc as a web server running IIS V.5 (Developer version)

thanks

Author

Commented:
darkeryu,

the easy way to slove this problme ,you can install smtp service on web server,and use
JMail.ServerAddress = Request.ServerVariables("local_addr")

Please tell me where to download the smtp service and how to install in.

Many thanks in advance

Author

Commented:
I download the smtp server and install on the machne (web server) but i got the following error

Error Type:
jmail.SMTPMail (0x8000FFFF)
Connection timed out Connection timed out


Of couse i change to use
JMail.ServerAddress = Request.ServerVariables("137.172.40.106");
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.