Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMTP Error using CDONTS

Status
Not open for further replies.

arst06d

Programmer
Nov 29, 2002
324
Hi
my website is hosted by Names.co.uk, who took over my original host Smartchoicenet. Ever since the takeover the contact form on my site has not worked.

I'm using cdonts on win2k/iis. Here's the form processing code:

dim strMessage
dim objMail


Set objMail = Server.CreateObject("CDONTS.Newmail")

objMail.To = "webmaster@twarchers.co.uk"
objMail.Subject = "Feedback from WebSite"
objMail.From = "webmaster@twarchers.co.uk"

strMessage = "Senders Name: " & Request.Form("txtName") & vbcrlf
strMessage = strMessage & "Senders Email: " & Request.Form("txtEmail") & vbcrlf
strMessage = strMessage & "Senders Phone: " & Request.Form("txtPhone") & vbcrlf
strMessage = strMessage & "Senders Club: " & request.form("txtClub") & vbcrlf & vbcrlf
strMessage = strMessage & "Type of Contact: " & request.Form("lstFeedback") & vbcrlf
strMessage = strMessage & "Comment: " & Request.Form("txtComment")



objMail.Body = strMessage
objMail.Send
Set objMail = Nothing


Response.Redirect("../mailreceived.asp")


what actually happens is that the mail is sent to webmaster@twarchers.co.uk, but smtp raises an error so the message is bounced back to the sender (also webmaster@twarchers.co.uk). The mailbox for my site is a cath-all thing so anything@twarchers.co.uk should reach me.

I always get the messages posted as an attachment with the error message, so I'm not losing contacts - it's just a bloody pain! The error I get reported is :

Reporting-MTA: dns;server208
Received-From-MTA: dns;server208
Arrival-Date: Tue, 17 Jun 2003 07:52:02 +0100

Final-Recipient: rfc822;webmaster@twarchers.co.uk
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp;553 <webmaster@twarchers.co.uk> not available

I can send messages direct to webmaster@twarchers.co.uk using outlook, and the bounced message reaches me too.

Tech Support at names.co.uk are being no help at all, blaming the rack-space operators, and this has been going on for a couple of months now. Obviously, there's not a lot I can do at my end, but I would appreciate any pointers so I can argue the case that 'something' must have happened in the takeover to suddenly cause these errors.

Many thanks.
 
If this is occurring with Outlook as wel, then someone has screwed up some configurations in either the DNS server, firewall, or mail server.
I sent you a test email to see if it failed for me also, let me know if it gets through.

-Tarwn

[sub]01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101 [/sub]
[sup]29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19[/sup]
Do you know how hot your computer is running at home? I do
 
Hi - thanks for replying.
Outlook messages reach me just fine - I maybe wan't clear enough on that. The problem only occurs when using CDONTS.

 
Simplify the message and then try

mail.BodyFormat = 0
mail.MailFormat = 0


Other than that.. check SMTP stuff.. privilages etc

ooooooooooooooooooooooooh bugger.
 
use some error trapping,

on error resume next

err.Description ..etc

ooooooooooooooooooooooooh bugger.
 
in cdonts usage on a web server, you need to specify a mail server address and also as said before by the others, verify your permissions

 
Tried all that - no errors raised at all by the send method.

I changed the recipient mail to my own personal address and it worked fine. So the problem only arises when I try to send a message to the webmaster mailbox via cdonts.

Thanks for your suggestions, but I think I'll have to leave it as-is. Oh - and change my hosting company!

 
just thought of something on this, are you located in the intranet of twarchers.co.uk ? otherwise you're trying to CDONTS outside of your network and most mail servers will not allow external send requests, like if your'e at home developing this and trying to push it thru the work server.
 
yes - sending a mail within same domain, so shouldn't be a problem. Thanks, anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top