|
| |
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
email - 4/20/2005 9:58:19
Hi, I need an example of asp code how to send email with attach file from the web site to the server Thanks, Elen
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: email - 4/20/2005 11:36:19
I have a code that doesn't work can anyone help me? <%
sub sendMail(fromWho,toWho,subject,body)
dim myMail
SET myMail=server.CreateObject("CDONTS.Newmail")
myMail.From=fromWho
myMail.TO=toWho
myMail.Subject=Subject
myMail.Body=Body
myMail.Send
SET myMail=nothing
end sub
fromWho=TRIM( Request.Form("fromWho"))
toWho=TRIM( Request.Form("toWho"))
Subject=TRIM( Request.Form("Subject"))
Body=TRIM( Request.Form("body"))
if toWho<>"" then
sendMail fromWho,toWho,Subject,body
end if
%>
<FORM method="POST" action="<%=Request.ServerVariables("SCRIPT_NAME")%>">
<br>TO:<INPUT type="text" name="toWho" size=40>
<br>FROM:<INPUT type="text" name="fromWho" size=40>
<br>SUBJECT:<INPUT type="text" name="subject" size=40>
<br><TEXTAREA rows=5 cols=40 id=textarea1 name=body></TEXTAREA>
<BR><INPUT type="submit" value="Send Mail" id=submit1 name=submit1>
</FORM>
|
|
|
|
BeTheBall
Posts: 6359 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: email - 4/20/2005 13:24:22
I thought you said you needed to include an attachment? The code above has no section for attachments. Do you need to include an attachment or did you misspeak?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: email - 4/21/2005 1:58:27
This is my first time creating the email application,what should I write in the fromWho? is this the person who look at the web site? What should I put in toWho? is this me? and if so, what should I put there? At the above code I tryied to create a form but it doesn't work, can you explain to me why?
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: email - 4/21/2005 4:06:55
at my code I input my email and I got en error messege in line 4
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|