
July 17th, 2000, 04:17 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 23
|
|
<i><b>Originally posted by : droffman (auman88@home.com)</b></i><br />Ok...first is that I can't use a component for several reasons, financial and because of the server. SEcond is that the file is either plain text or a word document only. If that changes anything. Next, here is th ecode...I tried using an attach file command thing...no error in my code, and but i haven't recieved the attachment back yet because my webserver's email takes several hours....i don't know why! Anyway, that article seemed very hard, eventhouhg I do have VB 6. I wasn't intending to go into that much depth.<br /><br /><br /><% @LANGUAGE="VBSCRIPT" %> <br /><% Option Explicit %><br /><%<br />'****BEGIN DIMENSIONING VARIABLES<br /> <br />Dim strJobTitle<br />Dim strFirst_Name<br />Dim strLast_Name <br />Dim strWork_Phone<br />Dim strHome_Phone<br />Dim strEmail<br />Dim strWillingness_To_Travel<br />Dim strCurrent_Job<br />Dim strCurrent_Employer<br />Dim strStarted_Job<br />Dim strFinished_Job<br />Dim strDegree<br />Dim strMajor<br />Dim strSchool<br />Dim strGreatest_Accomplishment<br />Dim objMail <br />Dim strUSERNAME<br />Dim strSUBJECT<br />Dim strSENDTO<br />Dim strBODYSTRING<br />Dim myMail<br />Dim strResume<br /><br /><br />'****GET VALUES OF VARIABLES<br /><br />strJobTitle = Request("JobTitle")<br />strEmail = Request.Form("Email") <br />strFirst_Name = Request.Form("First_Name")<br />strLast_Name = Request.Form("Last_Name")<br />strWork_Phone = Request.Form("Work_Phone")<br />strHome_Phone = Request.Form("Home_Phone")<br />strWillingness_To_Travel = Request.Form("Willingness_To_Travel")<br />strCurrent_Job = Request.Form("Current_Job")<br />strCurrent_Employer = Request.Form("Current_employer")<br />strStarted_Job = Request.Form("Started_Job")<br />strFinished_Job = Request.Form("Finished_Job")<br />strDegree = Request.Form("Degree")<br />strMajor = Request.Form("Major")<br />strSchool = Request.Form("School")<br />strGreatest_Accomplishment = Request.Form("Greatest_Accomplishment")<br />strResume = Request.Form("Resume")<br /><br /><br /><br />'****CREATE EMAIL <br />Set objMail = CreateObject("CDONTS.Newmail")<br />objMail.From = strFirst_Name & " " & strLast_Name<br />objMail.To = "auman88@home.com"<br />objMail.Subject = "New Job Application Submitted"<br />objMail.Importance = 2<br />objMail.AttachFile(strResume)<br />objMail.Body ="Applying for: " & strJobTitle & VbCrLf & "Name: " & strFirst_Name & " " & strLast_Name & VbCrLf & "Email: " & strEmail & VbCrLf & "Work Phone Number: " & strWork_Phone & VbCrLf & "Home Phone Number: " & strHome_Phone & VbCrLf & "Willingness to travel: " & strWillingness_To_Travel & VbCrLf & "Current Job: " & strCurrent_Job & VbCrLf & "Current Employer: " & strCurrent_Employer & VbCrLf & "Started Job: " & strStarted_Job & VbCrLf & "Finished Job: " & strFinished_Job & VbCrLf & "Degree: " & strDegree & VbCrLf & "Major: " & strMajor & VbCrLf & "School: " & strSchool & VbCrLf & "Greatest Accomplishment: " & strGreatest_Accomplishment <br /><br />objMail.Send <br />Set objMail = Nothing <br /><br />'-----------------------------------------------------------------------------------------------<br />'For Future Use...these are how to send more involved emails.<br />'objMail.Cc = "mailto:sschofield@aspfree.com;steve@aspfree.com" Notice this sending to more than one person!<br />'objMail.Bcc = "sschofield@aspfree.com;steve@aspfree.com"<br />'objMail.Importance = 1 '(0=Low, 1=Normal, 2=High)im a <br />'objMail.AttachFile "c  athfilename.txt", "filename.txt"<br />'------------------------------------------------------------------------------------------------<br /><br />'*** Reply Mail<br />'***Load Constants<br />strSENDTO = strEmail<br />strSUBJECT = "Thank you for applying."<br />strUSERNAME = ""<br /><br />'*** Build message body<br />strBodyString = strBodyString & "Thank you for taking the time to apply with us." & VbCrLf & VbCrLf<br />strBodyString = strBodyString & "Our evaluation process may take some time due to the number of resumes received.* Should your background be a match for our current needs, you will be contacted for an interview.* If not, be assured that your resume will be kept on file for future openings that occur within the next 12 months." & VbCrLf & VbCrLf<br />strBodyString = strBodyString & "We appreciates your interest and values your skills and experience."<br />'***Begin Send mail to customer***<br /> Set myMail = Server.CreateObject("CDONTS.NewMail") <br /> myMail.From = strUSERNAME<br /> myMail.To = strSENDTO<br /> myMail.Subject = strSUBJECT<br /> myMail.Body = strBodyString<br /> myMail.Send<br /> Set myMail = Nothing<br />'***End Send mail to customer***<br />%><br /><br /><br /><br /> Below this is an HTML saying thanks.<br /><br />Well if you know of anyway to do this, please respond or email me at auman88@home.com<br /><br />Dan<br /><br />------------<br />Matt at 7/17/2000 12:02:37 PM<br /><br />Hello,<br />well this is a challenge as you progress with ASP.<br />And there are a few ways to go about it. First question is what type of file is it. If it is just a text file you things maybe easier, but if it is a binary image or sound or something then you will have more to do. You probably need a file upload component. I used SA-fileup, or there is a free one from microsoft, called posting acceptor that has various bugs like it loses session varibles, I believe. There are a few other components that I have never used, I believe the microsoft one is the only free one. SA-Fileup cost $70. The alternative is to build one into a component and then register this component on your server. Check out this link, see if you can make heads-or-tails of it.<br />http://www.aspzone.com/articles/john/aspUpload/<br />You will need Visual Basic 6. Let me know how you get on.<br /><br />All the best,<br />Matt<br /><br />------------<br />droffman at 7/17/2000 9:28:32 AM<br /><br />Can someone help me...I'm making a form that is supposed to send me an email with the inputed values. My problem is that I need a file attached from the users machine that gets sent to me. The file name switches everytime. How can I do this?
|