Hi folks,
I'm using CDONTS to send an email with an image attachment. The following code works okay except for when I un-remark the "'MyCDONTSMail.AttachFile sUploadImage" line (when I just get a message saying 'there is a problem with the page you are trying to view etc etc, no error code):
<% dim sSubmit, sYourEmail, sFriendsEmail, sCat, sUploadImage dim sBody, MyCDONTSMail
sCat = request.form("cat") sSubmit = request.form("Submit") sYourEmail = request.form("YourName") sFriendsEmail = request.form("FriendsEmail") sUploadImage = Server.MapPath("/images/" & sCat & ".jpg")
if sSubmit = "Submit" then
Set MyCDONTSMail = CreateObject("CDONTS.NewMail") MyCDONTSMail.From = sYourEmail MyCDONTSMail.To = sFriendsEmail MyCDONTSMail.Subject = "Subject of Email" sBody = sYourEmail & " has sent the attached image to you, from etc..." & vbCrLf MyCDONTSMail.Body= sBody 'MyCDONTSMail.AttachFile sUploadImage MyCDONTSMail.Send set MyCDONTSMail=nothing
else
do summat else %>
|
Spot anything wrong with it???
Cheers very much for any help.
D