Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Send mail from localhost - Returns false

Reply
Thread Tools

Send mail from localhost - Returns false

 
 
Stuart Palmer
Guest
Posts: n/a
 
      03-18-2005
I have had for sometime a problem getting cdo.message to work, so I have
given up on this and tried to test a form on my localhost machine using
CDONTS again (this used to work)

I have win 2000 Pro and when running this simple code:
------------
Set objSendmail = Server.CreateObject("CDONTS.NewMail")
objSendmail.From = ""
objSendmail.To = ""
objSendmail.Subject = "Subject Line"
objSendmail.Body = "Message"
objSendmail.Importance = 2
bolWasSent = objSendmail.Send
Set objSendmail = Nothing

response.write(bolWasSent)
-----------

bolWasSent returns false and I get no mail.....it used to pop up a sending
window for outlook express andseconds later my test mail arrived. Looking in
my mailroot dir no mails are created.

Has anyone ay idea what the problem could be and how I can get this working
as it used to, but I have no idea what I have done.

Many thx, I'm desperate......working out whats wrong with CDONTS being sent
may even help fix sending mail with CDO which I'll then go back to.

Stu


 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      03-18-2005
Stop using CDONTS; use CDO.Message.
http://www.aspfaq.com/2336
http://www.aspfaq.com/2026

Why Outlook Express did or should pop up is a mystery to me. When your
application lives on a real web server, it is unlikely that Outlook Express
will have a valid account established, and even less likely that such a user
would be logged in every time this ASP code is invoked. Don't attempt to
use GUI applications from ASP, or to judge the success of the ASP code.

--
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.




"Stuart Palmer" <> wrote in message
news:yxE_d.2784$...
> I have had for sometime a problem getting cdo.message to work, so I have
> given up on this and tried to test a form on my localhost machine using
> CDONTS again (this used to work)
>
> I have win 2000 Pro and when running this simple code:
> ------------
> Set objSendmail = Server.CreateObject("CDONTS.NewMail")
> objSendmail.From = ""
> objSendmail.To = ""
> objSendmail.Subject = "Subject Line"
> objSendmail.Body = "Message"
> objSendmail.Importance = 2
> bolWasSent = objSendmail.Send
> Set objSendmail = Nothing
>
> response.write(bolWasSent)
> -----------
>
> bolWasSent returns false and I get no mail.....it used to pop up a sending
> window for outlook express andseconds later my test mail arrived. Looking

in
> my mailroot dir no mails are created.
>
> Has anyone ay idea what the problem could be and how I can get this

working
> as it used to, but I have no idea what I have done.
>
> Many thx, I'm desperate......working out whats wrong with CDONTS being

sent
> may even help fix sending mail with CDO which I'll then go back to.
>
> Stu
>
>



 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      03-18-2005
On Fri, 18 Mar 2005 17:50:22 GMT, "Stuart Palmer"
<> wrote:

>I have had for sometime a problem getting cdo.message to work, so I have
>given up on this and tried to test a form on my localhost machine using
>CDONTS again (this used to work)
>
>I have win 2000 Pro and when running this simple code:
>------------
>Set objSendmail = Server.CreateObject("CDONTS.NewMail")
> objSendmail.From = ""
> objSendmail.To = ""
> objSendmail.Subject = "Subject Line"
> objSendmail.Body = "Message"
> objSendmail.Importance = 2
> bolWasSent = objSendmail.Send
>Set objSendmail = Nothing
>
>response.write(bolWasSent)
>-----------
>
>bolWasSent returns false and I get no mail.....it used to pop up a sending
>window for outlook express andseconds later my test mail arrived. Looking in
>my mailroot dir no mails are created.


CDONTS should not pop up an Outlook Express window when sending. Do
you have SMTP running on this system (if not, CDONTS doesn't work)?
Have you tested the SMTP service? See:

HOW TO: Test Windows 2000 IIS SMTP Services Manually
http://support.microsoft.com/default...b;en-us;286421

>Has anyone ay idea what the problem could be and how I can get this working
>as it used to, but I have no idea what I have done.
>
>Many thx, I'm desperate......working out whats wrong with CDONTS being sent
>may even help fix sending mail with CDO which I'll then go back to.


Fixing CDONTS may or may not help, but fixing your CDO issue would be
the way to go anyway, if that's what you intend to use.

Jeff
 
Reply With Quote
 
Stuart Palmer
Guest
Posts: n/a
 
      03-18-2005
Hi Jeff,
I suspect they are related (they seem to give the same results), ideally
I'd like to use CDO but they should be using the same process I would have
thought, I just know for a fact the cdonts used to work.

I have run through the instructions at the url you supplied:

helo me
250 mydesktop Hello [127.0.0.1]
mail from:
250 2.1.0 ....Sender OK
rcpt to:
550 5.7.1 Unable to relay for

Where mydomain is my sites domainame, and me is my name (a valid email
address for my site)

I couldn't get any further than the rcpt to: line as it reports it cannot
relay (see above)

What could I do to sort this....it wouldn't suprise me if this is my
problem.

Thx
Stu


 
Reply With Quote
 
Jeff Cochran
Guest
Posts: n/a
 
      03-19-2005
On Fri, 18 Mar 2005 20:44:38 GMT, "Stuart Palmer"
<> wrote:

>Hi Jeff,
> I suspect they are related (they seem to give the same results), ideally
>I'd like to use CDO but they should be using the same process I would have
>thought, I just know for a fact the cdonts used to work.


CDO can use a remote SMTP server, CDONTS needs a local one. CDONTS
also is deprecated.

> I have run through the instructions at the url you supplied:
>
>helo me
>250 mydesktop Hello [127.0.0.1]
>mail from:
>250 2.1.0 ....Sender OK
>rcpt to:
>550 5.7.1 Unable to relay for
>
>Where mydomain is my sites domainame, and me is my name (a valid email
>address for my site)
>
>I couldn't get any further than the rcpt to: line as it reports it cannot
>relay (see above)


Then it's not your code. The SMTP server is not configured to relay
mail for the sending system. Set your SMTP server to relay for
127.0.0.1 and you should be golden. See a SMTP group or the docs for
your operating system fo details.

Jeff
 
Reply With Quote
 
Kyle Peterson
Guest
Posts: n/a
 
      04-30-2005
http://www.powerasp.com/content/new/...ail_cdosys.asp


"Stuart Palmer" <> wrote in message
news:yxE_d.2784$...
>I have had for sometime a problem getting cdo.message to work, so I have
> given up on this and tried to test a form on my localhost machine using
> CDONTS again (this used to work)
>
> I have win 2000 Pro and when running this simple code:
> ------------
> Set objSendmail = Server.CreateObject("CDONTS.NewMail")
> objSendmail.From = ""
> objSendmail.To = ""
> objSendmail.Subject = "Subject Line"
> objSendmail.Body = "Message"
> objSendmail.Importance = 2
> bolWasSent = objSendmail.Send
> Set objSendmail = Nothing
>
> response.write(bolWasSent)
> -----------
>
> bolWasSent returns false and I get no mail.....it used to pop up a sending
> window for outlook express andseconds later my test mail arrived. Looking
> in
> my mailroot dir no mails are created.
>
> Has anyone ay idea what the problem could be and how I can get this
> working
> as it used to, but I have no idea what I have done.
>
> Many thx, I'm desperate......working out whats wrong with CDONTS being
> sent
> may even help fix sending mail with CDO which I'll then go back to.
>
> Stu
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"def nothing=(data) false end" returns 'data' instead of 'false' IƱaki Baz Castillo Ruby 9 02-26-2009 09:38 PM
CustomValidator Returns False, but False is Ignored DJ ASP .Net 3 12-27-2007 10:29 AM
False positive, false intrusion, false alarm Nick Computer Security 3 04-26-2006 07:40 PM
Can I Reset the Root from localhost/myproject/ to localhost/ Alex ASP .Net 4 02-08-2005 01:45 PM
HttpModule -- how to intercept urls like http://localhost/abc/def or http://localhost/abc/def/ where abc, def are non virtual dir Jiong Feng ASP .Net 0 11-19-2003 05:29 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57