Question

jmail All servers failed to receive the message

Asked by: johnhardy

Hello
Suddenly  for some reason this jmail message has stopped working.
It was working OK on my development machine and my remote server.
Its is still Ok on the remote server but creates an error on the development machine.
The error is:
jmail.Message (0x8000FFFF)
The message was undeliverable. All servers failed to receive the message
/domain/Thank You.asp, line 42
The jmail component is installed.
I am using asp vbs with winXP
MailObj.MailServerUserName = "user@mydomain.co.uk"
I have tested this is working and have sent and received messages via Outlook.
Can anyone see why this code should not pass information from the previous page?
Many thanks
John
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Session("sess_name") = cStr(Request("name"))
Session("sess_myemail") = cStr(Request("myemail"))
Session("sess_description") = cStr(Request("description"))
Session("sess_telno") = cStr(Request("telno"))
%>
<%
' wrapper so email will only be sent when submit button is pressed
'If CStr(Request.Form("Submit")) <> "" Then
Set MailObj = Server.CreateObject("JMail.Message")
MailObj.Logging = true
MailObj.ISOEncodeHeaders = False
MailObj.From = "info@mydomain.co.uk"
MailObj.AddRecipient Request.Form("Myemail")
MailObj.AddRecipientBCC "info@test.co.uk"
'JMail.AddRecipient "info@mydomain.co.uk"
MailObj.Subject = " thank you for your enquiry"

MailObj.HTMLBody = "<html>"
MailObj.appendHTML "<head>"
MailObj.appendHTML "<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">"
MailObj.appendHTML "<title>Thank you for your message:   </title>"
MailObj.appendHTML "<style> *,body,table,tr,td"
MailObj.appendHTML "{font-family:verdana;font-size:10px;}"
MailObj.appendHTML "</style>"
MailObj.appendHTML "</head>"

MailObj.appendHTML "<body>"

MailObj.appendHTML "Thank you " & cStr(Request("name") &" "&("for sending the following information from the enquiry form.  We will be in touch with you quite soon.<p>"))
MailObj.appendHTML "Your email entered: " & cStr(Request("myemail") &" "& "<p>")
MailObj.appendHTML "Your Description entered: " & cStr(Request("description") &" "& "<p>")
MailObj.appendHTML "Your telno entered: " & cStr(Request("telno") &" "& "<p>")
'response.write cStr(Request("message"))
MailObj.appendHTML "</body>"
MailObj.appendHTML "</html>"

MailObj.MailServerUserName = "user@mydomain.co.uk"
MailObj.MailServerPassWord = "pword"
MailObj.Send("localhost")

if err.number <> 0 then
response.write err.number & " " & err.description & " "
end if

Set MailObj = Nothing
'End If
%>

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-17 at 05:15:05ID24739505
Topics

Active Server Pages (ASP)

,

Hypertext Markup Language (HTML)

,

JavaMail

Participating Experts
1
Points
500
Comments
17

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Jmail Puzzle
    Hello Experts. Can any one please spot why this jmail is not working? Local host is OK Many Thanks John <% ' *** Send An Email From A Web Page - JMail ' wrapper so email will only be sent when submit button is pressed If CStr(Request.Form("Submit")) <> &q...
  2. If CStr(Request.Form("Submit")) <> "" Then
    I have a basic test page asp which I cannot get working. untitled.asp It is jmail and sends an auto email. If I comment out If CStr(Request.Form("Submit")) <> "" Then .......... ......... and End If %> The email is sent when the page opens I...
  3. emails not being received jmail asp
    I have an asp page which uses jmail to send send messages to a number of people listed in the jmail page and some obtained via a recordset. Occasionally the messages do not reach the intended recipients. I am included in the list and I seem to get my copies correctly. The dis...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ChristoferDutzPosted on 2009-09-17 at 05:28:51ID: 25355224

Do you have a Mailserver installed on your development machine? You are sending to a Mailserver  on "localhost" so if you don't have a Mailserver on that host, this is the reason you are having problems. Change this to the ip/host-name of your mailserver ynd you should be ready to go.

 

by: johnhardyPosted on 2009-09-17 at 07:17:46ID: 25356492

Thanks ChristoferDutz
I am not sure what a mailserver is!
Perhaps its the mail component I am using jmail?
If so this is installed.
If it is not the jmail component can you explain the mailserver more please?

 

by: ChristoferDutzPosted on 2009-09-17 at 07:21:47ID: 25356550

No,

JMail prepares an Email and sends it, just like your normal Email client. The actual Mail Sending is done by the actual Mail-Server. As far as I could see, you set some login credentials in:

MailObj.MailServerUserName = "user@mydomain.co.uk"
MailObj.MailServerPassWord = "pword"

But then send it to an SMTP Server on "localhost" using:

MailObj.Send("localhost")

I think you have to change "localhost" to the ip of your remote Server (As you said that this is working on the remote Server). I assume on this machine there is an SMPT Server running. So if the Mailserver is not configured to only accept mails from localhost, you should be fine.

 

by: johnhardyPosted on 2009-09-17 at 07:36:40ID: 25356739

I have been using MailObj.Send("localhost") on this local machine and uploading it to the server for years and cant understand what has changed.
I tried commenting out
'MailObj.MailServerUserName =
and
'MailObj.MailServerPassWord =
 but it made no difference

 

by: ChristoferDutzPosted on 2009-09-17 at 07:50:57ID: 25356902

Would you please be so kind to at least try what I suggested?

 

by: ChristoferDutzPosted on 2009-09-17 at 07:56:35ID: 25356963

 

by: johnhardyPosted on 2009-09-17 at 09:04:42ID: 25357697

Sorry for the delay
Re Quote
I think you have to change "localhost" to the ip of your remote Server (As you said that this is working on the remote Server). I assume on this machine there is an SMPT Server running. So if the Mailserver is not configured to only accept mails from localhost, you should be fine.
I am not sure if there is an smtp server running I am using a server with FastHosts I expect there is, Can you say what should be written in place of localhost?

 

by: ChristoferDutzPosted on 2009-09-17 at 09:19:19ID: 25357896

Ok .. what is the name of the website, where everything works?
if the url is:
http://my.cool.server.com/blahblah/index.html
then you should add "my.cool.server.com" instead of localhost.
You can also try opening a CommandLine and type

telnet my.cool.server.com 25

And if you get something like
220 my.cool.server.com
(the 220 is important) then there is a mailserver running on that port. Then try

telnet localhost 25

You will propably get a: connection refused (or something similar)
Another very anoying thing can be Anti-Virus Software. These take controll over all outgoing Connection to port 25 to prevent Worms and Virusses from spreading. So Mabe you should check if you have updated your Virus-Scanner since the last time everything worked.

 

by: johnhardyPosted on 2009-09-17 at 10:50:12ID: 25358967

the first item returned
220 "domain" Simple Mail Transfer ready

The second item
telnet localhost 25
returned
220 "machine name" Microsoft ESMTP MAIL service, Version 6.0.2600.5512  ready etc

 

by: johnhardyPosted on 2009-09-17 at 11:08:16ID: 25359128

It occoured to me that Localhost on this local machine may be the problem.
On this local development machine
I have localhost being used with IIS on port 80 for asp and asp.net
I have another localhost for a database server know as Alpha 5 being used on port 8080
I wondered whether there could be a conflict with the two Localhosts on this PC
I have not uploaded the Alpha 5 Server to the remote machine yet so no possible conflict there.

 

by: ChristoferDutzPosted on 2009-09-18 at 01:00:17ID: 25363622

Well localhost just refers to the ipadress 127.0.0.1, which is allways the local machine. you can think of it as the word "Me" ... evern if you refer to yourself as "Me" ... someone else will certainly refer to himselt with "Me" to. This is because "Me" is sort of defined in a rather local context.

Back to your problem:
Could you please execute the following command:
netstat -a -b -n

One row of the example output is then:
  TCP    10.10.10.114:1056      87.77.26.229:14145     HERGESTELLT     3168
  [Skype.exe]

The first block is the protocol. The second is the ip-Adress which can be a real ip-adress (the one of your network card in your computer), 127.0.0.1 (which is localhost) and 0.0.0.0 which refers to any installed network (ip of the computer AND localhost) ... after the ":" in the ip field comes the port. This is where it starts getting interesting. Look for a row containing ":25" (25 is the default SMTP port)
There must be an application running on this port as you got a correct answer from a SMTP server. The row below this entry contains the name of the executable having opened this port.

Would you please post the row containing the ":25" and the row below it?

 

by: johnhardyPosted on 2009-09-18 at 04:19:32ID: 25364674

Thanks again
The screen kept disappearing so I took a photo
The row containing 25 is the top row.
Hope thats the one you require.
If it is not clear please let me know.

 

by: ChristoferDutzPosted on 2009-09-18 at 04:34:49ID: 25364772

Ok ... so you are running an Internet Information Server and have configured some sort of SMTP Service ... I think you will have to configure this Service:
http://www.codeproject.com/KB/winsdk/ConfigServerSmtp.aspx
As I don't know which version of IIS you are actually using, I'd just try to look at this and mabe you even see something in the System logs.

 

by: johnhardyPosted on 2009-09-18 at 06:42:43ID: 25365826

Thanks
I have IIS 5.1 on my xp machine here and IIS 6 on the web server2003
Thats a very interesting article, many of the features within IIS I am not familiar with but I cannot see anything obvious that is at present incorrectly set up.
What I have found in the jmail code is the line
MailObj.Send("localhost") when changed to
'MailObj.Send("mail.mydomain.co.uk") the email seems to work perfectl;y correctly.
I am not sure if I am missing something here or whether that change is advisable. Maybe you have a view on this

 

by: ChristoferDutzPosted on 2009-09-18 at 06:53:53ID: 25365948

Well I remember that being the thing I recommended to you. With "localhost" you connect to a local Email-Server and let that one do the actual sending. When seting it to "mail.mydomain.co.uk" you ask the official Mailserver to send the email. So I would certainly recommend the "mail.mydomain.co.uk" setting as this works on ANY machine.

 

by: johnhardyPosted on 2009-09-18 at 06:59:21ID: 25366013

Thanks very much for the great help and patience shown to me.
I will use that method and I understand what is happening so much better now with your help.
Regards
John

 

by: johnhardyPosted on 2009-09-18 at 07:00:07ID: 31629964

A great expert!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...