Free Advertising - Mobile Phones - Team Building in London - Mortgage - Flights

PDA

View Full Version : mailing from ASP


gilgalbiblewheel
Jul 22nd 2005, 12:37 pm
I would like to know how to mail from Active Server Pages. I found this site:

http://www.frii.com/support/knowledgebase/viewArticle.php?articleID=677

I get:

Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'CDO.Message'

/wheelofgod/mailing.asp, line 3


How is that dealt with?
But you may have better suggestions of other emailing systems.

vectorgraphx
Jul 22nd 2005, 1:05 pm
your server needs to have CDONTS installed on it for the above example to work, it's not installed by default. make sure that this feature is running.

VG

p.s. as far as suggestions, there are several out there, but you need to know what components your server has installed for any of them to work. I use ASPEMAIL, but that's something my host has installed.

gilgalbiblewheel
Jul 22nd 2005, 2:37 pm
How can I do that? Is there a step by step guide?

I also wonder how then am I going to retrieve the asp email?

I'm totally new to this. But I think it's about time to know and use it.

vectorgraphx
Jul 25th 2005, 6:19 am
I'd start by asking your host if CDONTS is enabled. it appears from your code example that it isn't. once you verify that it is or is not working, then you can proceed on to the next step - debugging your code. without your actual code it's hard to say what's happening, however.

As far as retreiving the asp email, that's the easy part. it'll come to your inbox if set up properly.

VG

iShopHQ
Jul 25th 2005, 2:04 pm
CDO is the mailer object for IIS 6

CDONTs is the mailer for IIS5

If you are trying to vreate a CDO object on IIS5, it won't work.

Also, SMTP has to be installed on the server, but most web servers install that so people can email from ASP. Here's a script taht accepts inputs from a form and mails them out for IIS6. I do my form validation here, shich isn't the best way to do it, but I was too lazy to do javascript valifation on the form page. This will NOT work with Windows 2000 and IIS5-

<%
dim fEmail, fBody, fname, strError

fEmail = Request.form("email")
fBody = Request.form("body")
fName = Request.form("name")
strError = ""

If fEmail = "" Then strError = "Please enter an email address.<br>"
if Instr(fEmail,"@") = 0 then strError = strError & "That email address doesn't apppear to be valid.<br>"

If fBody = "" Then strError = strError & "It doesn't appear as though you entered a message!<br><br>"

If fName = "" Then strError = strError & "Please enter a name!<br><br>"

If strError = "" then
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Email From Webform"
myMail.From=fEmail
myMail.To="email-to-mail-to"
myMail.HTMLBody = "From: "&fName&"<br><br>"&fBody
myMail.Send
set myMail=nothing

response.redirect("thanks.asp")
End If

End If
%>

As for retreiving - no such thing. It shows up inthe mailbox of whomever you send it too just like a regular mail.

sji2671
Jul 25th 2005, 2:41 pm
Most decent hosts should also be able to provide a free mail2email script that works with their installed components.