SEO Class in Chicago, IL
Learn How To Optimize Your Website on July 26, 2013
High Rankings is offering a 1-day customized SEO training class in Chicago. Class size is limited so please sign-up now if you want in!
Are you a Google Analytics enthusiast?
Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE!

www.CustomReportSharing.com
From the folks who brought you High Rankings!
More SEO Content
Reg Sending Email
#1
Posted 17 September 2008 - 08:43 AM
The code is
mailobj.AddAttachment "http://www.anysite.c...news/news.html" is working fine
but suppose I have to attach the file stored in the folder news dynamically based on imput from form it shows error as unable to locate file
I tried something like:
mailobj.AddAttachment "http://www.anysite.com/news/" & thefilenameVar
but shows error in that line. Plz help as I am new to ASP and coding.
#2
Posted 17 September 2008 - 09:01 AM
Also would the path to a file ASP is trying to attach be a file path not a URL ?
i.e. C:\websites\myweb\news\filename
that's what it would be if I was using perl to attach a file to an email.
Edited by 1dmf, 17 September 2008 - 09:09 AM.
#3
Posted 17 September 2008 - 10:52 AM
Example:
You're running the mail script from www.mysite.com/sendmail.asp
The file you want to attach is in www.mysite.com/news/ [any file name]
To attach it I think you need to do the following:
But, as 1DMF says, you may need to check that the file name is being passed correctly to your variable to do this, above the line that's giving you the error put:
Response.END
That will write out what's in your variable and stop the script from executing so you can have a look at it.
#4
Posted 18 September 2008 - 06:14 AM
.AddAttachment Server.MapPath(".") & "\news\" & theFileName.
It worked both in local and online.
#5
Posted 18 September 2008 - 06:31 AM
forward slash vs backslash?
#6
Posted 18 September 2008 - 06:34 AM
After 15 years you would have thought I'd remember by now
#7
Posted 18 September 2008 - 07:30 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









