|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
ASP formmail / autorespond
I'm trying to use a form where a site visitor can chosse several items and submit their e-mail address. The form should then send the visitor the items they selected as e-mail attachements and mail the form's contents to the website owner's e-mail.
Can anyone recommend a way to do this using ASP. I have access to aspFusion's advSMTP component on my hosting service, but neither they nor aspfusion provide any documentation with examples of how to use it. Thanks in advance for any help. |
|
#2
|
|||
|
|||
|
Are you looking for the email componant?
There is an email componant from Dundas software (www.dundas.com) is free and very easy to use. I love it. Sending attachmens is very easy is well documented A small snip of sample code (w/o the attachment code) is: <snip> Set objMailer = Server.CreateObject("Dundas.Mailer") objMailer.SMTPRelayServers.Add "127.0.0.1" objMailer.FromAddress = "admin@mysite.com" objMailer.FromName = "Your Webserver" objMailer.Subject = "Your requested info" objMailer.TOs.Add Request.Form("Email") objMailer.BCCs.Add "admin@mysite.com" sBody = sBody & "Here is the info.." & vbCrLf sBody = sBody & "" & vbCrLf sBody = sBody & "Add misc text here..." & vbCrLf sBody = sBody & "" & vbCrLf objMailer.Body = sBody objMailer.SendMail Set objMailer = Nothing </snip> |
|
#3
|
|||
|
|||
|
Assuming you are using a web hosting company, check their support information.
There are numerous ways to do what you want, and it depends upon server configuration. I've used Jmail, but there are many other components that do the trick. Ray |
|
#4
|
|||
|
|||
|
If you're hosted on an IIS server why not use the built in CDONTS object? Nothing extra is needed.
Code:
<%
Dim objCDOMail, Email_Body
set objCDOMail = Server.CreateObject("CDONTS.NewMail")
with objCDOMail
.MailFormat = 1 '0=MIME, 1=TEXT
.BodyFormat = 1 '0=HTML, 1=TEXT
.Importance = 1
.From = "webmaster@domain.com"
.To = CustomerEmail
.Subject = "your subject here."
Email_Body = "text"
Email_Body = Email_Body & "more text"
Email_Body = Email_Body & "more text, etc."
.Body = Email_Body
end with
objCDOMail.Send
set objCDOMail = nothing
%>
Last edited by dotMATRIX : March 7th, 2003 at 04:00 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP formmail / autorespond |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|