469,623 Members | 1,036 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

CDONTS - no attachments

I am using cdonts to send mail messages with an attachment. The problem I am
having is the messages are going through OK but the attachments are not
there. Any ideas? I have tried my code elsewhere and it looks
OK...........Jason
Oct 5 '05 #1
4 1771
1) Show the code
2) where is the attachment stored? On the SERVER right?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Jason Steeves" wrote:
I am using cdonts to send mail messages with an attachment. The problem I am
having is the messages are going through OK but the attachments are not
there. Any ideas? I have tried my code elsewhere and it looks
OK...........Jason

Oct 5 '05 #2
It gets the attachment from a field, within the web form, that the user can
browse to the required file. I believe the files that the users need to
attach are on their individual computers. If I put
(trim(Request.Form("attachedfile"))) inplace for the subject it does return
the valid path to the file along with the file name ie: c:\jason.txt.

Thanks for any help you can provide............Jason

dim MailObj
set MailObj = Server.CreateObject("CDONTS.NewMail")
MailObj.To = "va***@realemail.com"
MailObj.From = trim(Request.Form("txtOriginatorMailID"))
MailObj.AttachFile (trim(Request.Form("attachedfile")))
MailObj.Subject = "sending"
MailObj.Body = rstreg
MailObj.BodyFormat = 0
MailObj.MailFormat = 0
MailObj.Send
set MailObj = nothing

"Curt_C [MVP]" wrote:
1) Show the code
2) where is the attachment stored? On the SERVER right?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Jason Steeves" wrote:
I am using cdonts to send mail messages with an attachment. The problem I am
having is the messages are going through OK but the attachments are not
there. Any ideas? I have tried my code elsewhere and it looks
OK...........Jason

Oct 5 '05 #3
first off, the files for attachment have to be on the server, the cdonts (you
really should use CDO and not CDONTS also) is on the server, and it doesnt
have access to files on the client.

Secondly, try hardcoding one of the server files as the attachment file and
test.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Jason Steeves" wrote:
It gets the attachment from a field, within the web form, that the user can
browse to the required file. I believe the files that the users need to
attach are on their individual computers. If I put
(trim(Request.Form("attachedfile"))) inplace for the subject it does return
the valid path to the file along with the file name ie: c:\jason.txt.

Thanks for any help you can provide............Jason

dim MailObj
set MailObj = Server.CreateObject("CDONTS.NewMail")
MailObj.To = "va***@realemail.com"
MailObj.From = trim(Request.Form("txtOriginatorMailID"))
MailObj.AttachFile (trim(Request.Form("attachedfile")))
MailObj.Subject = "sending"
MailObj.Body = rstreg
MailObj.BodyFormat = 0
MailObj.MailFormat = 0
MailObj.Send
set MailObj = nothing

"Curt_C [MVP]" wrote:
1) Show the code
2) where is the attachment stored? On the SERVER right?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Jason Steeves" wrote:
I am using cdonts to send mail messages with an attachment. The problem I am
having is the messages are going through OK but the attachments are not
there. Any ideas? I have tried my code elsewhere and it looks
OK...........Jason

Oct 5 '05 #4
And here is a pure ASP (i.e. no components) resource for letting the
user upload a file which is something that was unfortunately not built
into ASP:

ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
http://aspzone.com/articles/160.aspx

The above free code has worked well for me and you can copy and paste
the code sample which is white on gray (what were they thinking?) or
just highlight it and it becomes black on white.

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips

*** Sent via Developersdex http://www.developersdex.com ***
Oct 5 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Chris Kennedy | last post: by
2 posts views Thread by Anthony Boudouvas | last post: by
2 posts views Thread by =?Utf-8?B?amxvcGVzMTUx?= | last post: by
7 posts views Thread by Paul | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.