Reputation: 235
Send email with attachment,that attachement will be uploaded in the same FORM where from the mail gets triggered.
BACKGROUND: i.e. I have an FORM that will take name, address etc details from a FROM. After filling the details user would be allowed to a browse and upload an attachment. Onclicking the Upload button the file will get uploaded to the server.
After doing all of the above action when the users clicks on SUBMIT button in this FROM, it should trigger a email with all the details entered in the FORM and With the uploaded file attached in it.
Now, the problem I am facing is : when I click on UPLOAD button, the file is getting uploaed but all the inputs entered gets disappeared.
Any resolution around this will be appreciated.
N.B: We are not using any free ware like for mail functioanlity. Mail is send by a vbscript function.
below is the logic how i/p fields values are getting captured:
ssr_imo = sql_ship_friendly(request.form("ssr_imo"),10)
ssr_ship_name = sql_ship_friendly(request.form("ssr_ship_name"),100)
ssr_ins_nr = sql_ship_friendly(request.form("ssr_ins_nr"),20)
ssr_ins_date = sql_date_friendly(request.form("ssr_ins_date"),30)
port_name = sql_ship_friendly(request.form("port_name"),50)
ssr_port_id = sql_ship_friendly(request.form("ssr_port_id"),20)
opStat = sql_ship_friendly(request.form("opStat"),20)
subEmail = sql_ship_friendly(request.Form("ssr_sub_email"),200)
subName = sql_ship_friendly(request.Form("ssr_sub_name"),70)
ssr_q2 = validate_q_ssr(request.form("ssr_q2"))
ssr_q3 = validate_q_ssr(request.form("ssr_q3"))
debugNote "<b> TEST = </b>" & ssr_q3
ssr_q4 = validate_q_ssr(request.form("ssr_q4"))
ssr_q5 = validate_q_ssr(request.form("ssr_q5"))
ssr_q6 = validate_q_ssr(request.form("ssr_q6"))
ssr_q7 = validate_q_ssr(request.form("ssr_q7"))
ssr_q8 = validate_q_ssr(request.form("ssr_q8"))
ssr_q9 = validate_q_ssr(request.form("ssr_q9"))
ssr_q10 = validate_q_ssr(request.form("ssr_q10"))
ssr_q11 = validate_q_ssr(request.form("ssr_q11"))
ssr_q12 = validate_q_ssr(request.form("ssr_q12"))
ssr_q13 = validate_q_ssr(request.form("ssr_q13"))
ssr_qa = validate_q_ssr(request.form("ssr_qa"))
ssr_qb = validate_q_ssr(request.form("ssr_qb"))
Upvotes: 0
Views: 430
Reputation: 10752
Once you change your form enctype to "multipart/form-data" you can no longer retrieve input values with Request or Request.Form, you have to use the method/function that is part of the upload component or script that you are using.
For example:
(In both cases obj is the name of your upload component object instance and inputName is the name of your form element)
Edit: Using the ASP class you are using for uploading you should use Uploader.Form instead of Request.Form to retrieve input values.
Upvotes: 1