469,609 Members | 1,437 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

A simple e-mail error - HELP

This is going to be a really simple question to answer (I hope). I have used this code before and it worked. However, I am using this code on a different web server, but the web server does claim to support it!

My code:

dim MyMail, SmtpMail

Set MyMail = Server.CreateObject("CDO.Message")
SmtpMail.SmtpServer = "mail.DOMAIN.com"

MyMail.Subject="Thank you for contacting DOMAIN"
MyMail.HTMLBody="text goes here"

Set MyMail=Nothing

The error I get is

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/contact-sent-test.asp, line 12

(Line 12 is the MyMail.Send)

Previously, I tried this with out the SmtpMail.SmtpServer = "mail.DOMAIN.com" and the error message was "access is denied"

Any ideas? Thank you
Jan 22 '08 #1
1 993
The error is now sorted. It needed a valid e-mail address in BOTH To and From... D'oh!!

Jan 22 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by delisonews | last post: by
8 posts views Thread by Dan | last post: by
13 posts views Thread by Michael B Allen | last post: by
6 posts views Thread by KevinD | last post: by
4 posts views Thread by Steven Blair | last post: by
7 posts views Thread by abcd | last post: by
14 posts views Thread by Giancarlo Berenz | last post: by
30 posts views Thread by galiorenye | last post: by
1 post views Thread by =?ISO-8859-1?Q?Tor_Erik_S=F8nvisen?= | last post: by
17 posts views Thread by Chris M. Thomasson | last post: by
reply views Thread by Solution2021 | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.