954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

File attached/uploaded in form and emailed

Hi,

I'm sure this has been discussed here somewhere, but I can't find exactly what I want...

I have a form set up that is sent to different email addresses based on field selections.

Sometimes that user will need to attach a file to send too.

I have found code to enable the user to upload a file (to server or to Access Database) (thank you Lewis E. Moten III: http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=7361&lngWId=4 ), but I cannot find anything on how to attach the uploaded file to the email sent to end-user, on submission.

Any help much appreciated!

lewilaloupe
Newbie Poster
6 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

What are you using to send the email? For example CDONTS, CDOSYS or is it for Apache?

ArtistScope
Junior Poster
150 posts since Jun 2010
Reputation Points: 5
Solved Threads: 14
 
What are you using to send the email? For example CDONTS, CDOSYS or is it for Apache?

Just for some closure on this...

I ended up using

http://www.stardeveloper.com/articles/display.html?article=2001033101&page=1


to write the files to a database (option for uploading to server also on this site) and then using CDONTS to send the email:

dim objMail

Set objMail = CreateObject("CDONTS.NewMail")

objMail.To = "mail@mail.com"
objMail.From = Trim(email)
		objMail.BodyFormat = 0 ' HTML format
		objMail.MailFormat = 0
		....

' -- send the email --			   
objMail.Send

' -- clean up object
Set objMail = Nothing
lewilaloupe
Newbie Poster
6 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: