#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    3
    Rep Power
    0

    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. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Minneapolis, MN
    Posts
    11
    Rep Power
    0
    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>
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    NJ, USA
    Posts
    11
    Rep Power
    0
    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
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Cincinnati, Ohio
    Posts
    25
    Rep Power
    0
    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.

IMN logo majestic logo threadwatch logo seochat tools logo