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 = "
[email protected]"
.To = txtEmail.Text
'.Cc = "
[email protected];tadair01@sprintspectr um.com;
[email protected]"
.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