User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 456,597 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,453 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1567 | Replies: 1
Reply
Join Date: Dec 2006
Posts: 20
Reputation: michael.ngobeni is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
michael.ngobeni michael.ngobeni is offline Offline
Newbie Poster

Send email with attachment

  #1  
Sep 6th, 2007
I am having a problem with sending an email with an attachment

Set msg = CreateObject("CDO.Message")
msg.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 msg.Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value="100.1.2.3"
msg.Subject = "Test Subject"
msg.From = "some@email.com"
msg.To = "some@email.com"
msg.TextBody = "Test Message"
msg.AddAttachment "C:\files\a.doc")

This works fine, but my problem is when a client/user use his computer to send an email to a remote server over the web
I believe the msg.AddAttachment "C:\files\a.doc") will change to something like msg.AddAttachment "the user local hard drive")

How do I solve this?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 14
Reputation: kaykays is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
kaykays kaykays is offline Offline
Newbie Poster

Re: Send email with attachment

  #2  
Sep 11th, 2007
You can use the Server.MapPath("/") function to find the full path.
PHP | ASP
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 6:58 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC