Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 24th, 2003, 11:11 AM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Email Attachments

I am trying to send an attachment wher the user can pick a file from thier drive. How can I pass the file name.

HTML Code
<INPUT id="txtAttachment" style="Z-INDEX: 140; LEFT: 117px; POSITION: absolute; TOP: 450px" type="file" name="FileAttachment" runat="server" dataFld="test">


ASP code-behind file using SmtpMail

With mailMsg
                '********Need to change to who assigns jobs*************
                .From = "priede01@sprintspectrum.com"
                .To = txtEmail.Text

                '.Cc = "priede01@sprintspectrum.com;tadair01@sprintspectr um.com;asteut01@sprintspectrum.com"

                .Subject = "ReqID " & intNewRequest & " has been submitted."
                .Body = "Thank you " & txtName.Text & " for submitting you request. We will do our best to meet your reporting needs. You will be notified when this request has been assigned."
                Try
strAttach=Path.GetFullPath(postedFile.FileName)
objAttach = New MailAttachment(strAttach)
                    mailMsg.Attachments.Add(objAttach)
                Catch
                End Try

            End With






Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Attachments with email arshad mahmood Classic ASP Professional 3 May 31st, 2006 08:13 PM
Email with Attachments echovue Access 2 March 22nd, 2005 10:36 AM
Email attachments tucker Excel VBA 1 June 10th, 2004 03:25 AM
Sending email attachments KARENM Access VBA 2 August 8th, 2003 07:07 AM
Email w/Attachments aingalsbe PHP How-To 1 June 25th, 2003 04:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.