---
title: "MySmartMail"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/53831-mysmartmail"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Bucher"
published: "2002-09-20T22:16:29.000Z"
updated: "2002-09-20T22:16:29.000Z"
replies: 0
views: 223
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/53831-mysmartmail"
---

# MySmartMail

## #1 — Bucher, 2002-09-20T22:16Z

jag har ett problem..
Jag har installerat MySmartMail på min webbserver och har gjort en html med ett formulär. Tänkte sedan göra en attachment funktion. har skrivit då i asp filen:

mySmartMail.Attachments.Add = Request("filen")

filen är fältet i html sidan där den hämtar adressen till filen som ska bifogas..

Så hela koden för sidan ser ut så här:

\<%

	On error resume next

	Dim mySmartMail
	Set mySmartMail = Server.CreateObject("aspSmartMail.SmartMail")

'	Mail Server
'	\*\*\*\*\*\*\*\*\*\*\*
	mySmartMail.Server = "bbsmtp.tninet.se"

'	From
'	\*\*\*\*
	mySmartMail.SenderName = Request("SenderName")
	mySmartMail.SenderAddress = Request("SenderAddress")

'	To
'	\*\*
	mySmartMail.Recipients.Add Request("email")

'	Message
'	\*\*\*\*\*\*\*
	mySmartMail.Subject = Request("Subject")
	mySmartMail.Body = Request("Body")

'	Attached file
'	\*\*\*\*\*\*\*\*\*\*\*\*\*
	mySmartMail.Attachments.Add = Request("filen")

'	Send the message
'	\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
	mySmartMail.SendMail

	if err.number \<\> 0 then

		response.write("Error n° " &  err.number - vbobjecterror & " = " & err.description  & "\<br\>")
		
	else

		Response.Write "aspSmartMail has sent your message."

	end if

	set mySmartMail = nothing

%\>

scriptet fungerar om sökvägen är på servern, men inte om man är client och ska bifoga en fil från en client dator i formuläret...

hoppas någon har lösningen..  :q

Permalänk: https://www.webforum.nu/p/53831

---

Tråden på webben: https://www.webforum.nu/amne/asp/53831-mysmartmail
