Attach file to e mail from FP form

W

Wayne-I-M

_________________________________________________
Is there a way to do this in Frontpage.
_________________________________________________

I have a function (mailThisUrl) that works fine like this

function mailThisUrl()
{
var subj = "Re - UK Outdoor Pursuits website..."
var text = "Have a look at this website and let me know what you think "
var thispage = parent.location.href
var content = "mailto:"
+ document.forms['eMailer'].elements['address'].value
+ "?subject=" + subj
+ "&body=" + text + "%0d%0a"
+ parent.document.title
+ " (" + thispage + ")"
window.location = content
}

Which is actioned from a form with a button

<form id="eMailer" name="eMailer" action="">
<font face="Arial" color="#FFFFFF" size="2">Enter recipient's
e-mail:<b><br />
</b></font>
<input type="text" id="address" name="address" size="30" />
<input type="button" value="Send" style="cursor:hand; font-family:Arial;
font-size:10pt; color:#FFFFFF; font-weight:bold; background-color:#288AAA"
onclick="mailThisUrl()" />

I am looking for a way to insert (attach) the content of a form field.
So if someone browse to a file on their hard drive they could simply click a
button and have the file sent as an attachment. I am “not†looking to upload
the file to the server just to have it sent as an attachment to me in an e
mail.

Can this type of thing bit added to attached a file
Enter recipient's e-mail:<b><br />
Like this (made up code)
Attach file to e mail:<b><br />


Maybe this can’t be done I may be a little too much access oriented in my
whole approach to this project :)

Any tips or links what be really appreciated.

_________________________________________________

Maybe I am still looking at this to much like access – where you can send an
e mail using DoCmd.SendObject Like this

DoCmd.SendObject TypeOfObject, "NameOfObject", "Format", WhereToSendIt,
CC(If req), "", "Subject Line ", "Detail Line ", False, """"
All quite simple
Basically this sends “something†to “someone†(e mail address –
WhereToSendIt) you have some text in the subject of the e mail (Subject Line)
and some text in the main section of the email (Detail Line). The
“NameOfObject†is attached to the e mail. (The False bit and """" at the end
do other "stuff")
 
S

Stefan B Rusynko

Not Possible w/ the FP forms handler

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| _________________________________________________
| Is there a way to do this in Frontpage.
| _________________________________________________
|
| I have a function (mailThisUrl) that works fine like this
|
| function mailThisUrl()
| {
| var subj = "Re - UK Outdoor Pursuits website..."
| var text = "Have a look at this website and let me know what you think "
| var thispage = parent.location.href
| var content = "mailto:"
| + document.forms['eMailer'].elements['address'].value
| + "?subject=" + subj
| + "&body=" + text + "%0d%0a"
| + parent.document.title
| + " (" + thispage + ")"
| window.location = content
| }
|
| Which is actioned from a form with a button
|
| <form id="eMailer" name="eMailer" action="">
| <font face="Arial" color="#FFFFFF" size="2">Enter recipient's
| e-mail:<b><br />
| </b></font>
| <input type="text" id="address" name="address" size="30" />
| <input type="button" value="Send" style="cursor:hand; font-family:Arial;
| font-size:10pt; color:#FFFFFF; font-weight:bold; background-color:#288AAA"
| onclick="mailThisUrl()" />
|
| I am looking for a way to insert (attach) the content of a form field.
| So if someone browse to a file on their hard drive they could simply click a
| button and have the file sent as an attachment. I am “not†looking to upload
| the file to the server just to have it sent as an attachment to me in an e
| mail.
|
| Can this type of thing bit added to attached a file
| Enter recipient's e-mail:<b><br />
| Like this (made up code)
| Attach file to e mail:<b><br />
|
|
| Maybe this can’t be done I may be a little too much access oriented in my
| whole approach to this project :)
|
| Any tips or links what be really appreciated.
|
| _________________________________________________
|
| Maybe I am still looking at this to much like access – where you can send an
| e mail using DoCmd.SendObject Like this
|
| DoCmd.SendObject TypeOfObject, "NameOfObject", "Format", WhereToSendIt,
| CC(If req), "", "Subject Line ", "Detail Line ", False, """"
| All quite simple
| Basically this sends “something†to “someone†(e mail address –
| WhereToSendIt) you have some text in the subject of the e mail (Subject Line)
| and some text in the main section of the email (Detail Line). The
| “NameOfObject†is attached to the e mail. (The False bit and """" at the end
| do other "stuff")
|
|
| --
| Wayne
| Manchester, England.
|
 
W

Wayne-I-M

Thank you for your answer Stefan. I still have a "lot" to learn about
website creation (it's fun though)


--
Wayne
Manchester, England.



Stefan B Rusynko said:
Not Possible w/ the FP forms handler

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| _________________________________________________
| Is there a way to do this in Frontpage.
| _________________________________________________
|
| I have a function (mailThisUrl) that works fine like this
|
| function mailThisUrl()
| {
| var subj = "Re - UK Outdoor Pursuits website..."
| var text = "Have a look at this website and let me know what you think "
| var thispage = parent.location.href
| var content = "mailto:"
| + document.forms['eMailer'].elements['address'].value
| + "?subject=" + subj
| + "&body=" + text + "%0d%0a"
| + parent.document.title
| + " (" + thispage + ")"
| window.location = content
| }
|
| Which is actioned from a form with a button
|
| <form id="eMailer" name="eMailer" action="">
| <font face="Arial" color="#FFFFFF" size="2">Enter recipient's
| e-mail:<b><br />
| </b></font>
| <input type="text" id="address" name="address" size="30" />
| <input type="button" value="Send" style="cursor:hand; font-family:Arial;
| font-size:10pt; color:#FFFFFF; font-weight:bold; background-color:#288AAA"
| onclick="mailThisUrl()" />
|
| I am looking for a way to insert (attach) the content of a form field.
| So if someone browse to a file on their hard drive they could simply click a
| button and have the file sent as an attachment. I am “not†looking to upload
| the file to the server just to have it sent as an attachment to me in an e
| mail.
|
| Can this type of thing bit added to attached a file
| Enter recipient's e-mail:<b><br />
| Like this (made up code)
| Attach file to e mail:<b><br />
|
|
| Maybe this can’t be done I may be a little too much access oriented in my
| whole approach to this project :)
|
| Any tips or links what be really appreciated.
|
| _________________________________________________
|
| Maybe I am still looking at this to much like access – where you can send an
| e mail using DoCmd.SendObject Like this
|
| DoCmd.SendObject TypeOfObject, "NameOfObject", "Format", WhereToSendIt,
| CC(If req), "", "Subject Line ", "Detail Line ", False, """"
| All quite simple
| Basically this sends “something†to “someone†(e mail address –
| WhereToSendIt) you have some text in the subject of the e mail (Subject Line)
| and some text in the main section of the email (Detail Line). The
| “NameOfObject†is attached to the e mail. (The False bit and """" at the end
| do other "stuff")
|
|
| --
| Wayne
| Manchester, England.
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top