Send email with attachment

Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Dec 2006
Posts: 20
Reputation: michael.ngobeni is an unknown quantity at this point 
Solved Threads: 0
michael.ngobeni michael.ngobeni is offline Offline
Newbie Poster

Send email with attachment

 
0
  #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?
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 14
Reputation: kaykays is an unknown quantity at this point 
Solved Threads: 0
kaykays kaykays is offline Offline
Newbie Poster

Re: Send email with attachment

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

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC