Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Jmail & W3 Upload...

Reply
Thread Tools

Jmail & W3 Upload...

 
 
BDKiii
Guest
Posts: n/a
 
      01-12-2004
Ok.. I know this has been covered before -but- here it is again...
I installed Jmail to my server and tested it... and it worked fine.
I then installed W#.Upload to the same server and tested it to attach
a document or image file from a users PC and attach it to the email on
the fly.

I used the following 3 files to do this (attach1.htm, attach2.asp, &
attach3.htm)

I receive the text data via email... but no attachment... am I missing
something here? Any help would be greatly appreciated.

*****************
** attach1.htm **
*****************
<html>
<head>
<title>Send Mail</title>

</head>

<body bgcolor="#FFFFFF">
<form action="attach2.asp" method="POST"
enctype="multipart/form-data">
<div align="left">
<input type="hidden" name="recipient"
value="(E-Mail Removed)">
<input type="hidden"
name="redirect" value="attach3.htm">
<input type="hidden" name="subject"
value="Web Site Submission">
<table border="0"
cellspacing="0" cellpadding="5" align="center">
<tr>
<td align="right"><font size="1"><small><font
face="Verdana">Name</font></small></font></td>
<td align="left">
<input type="text" name="name" size="30">
</td>
</tr>
<tr>
<td align="right"><font size="1"><small><font
face="Verdana">Address</font></small></font></td>
<td align="left">
<textarea rows="2" name="address" cols="25"></textarea>
</td>
</tr>
<tr>
<td align="right"><font size="1"><small><font
face="Verdana">Email Address</font></small></font></td>
<td align="left">
<input type="text" name="sender" size="30">
</td>
</tr>
<tr>
<td align="right"><font face="Verdana"
size="1"><small>Comment</small></font></td>
<td align="left">
<input type="text" name="comment" size="30">
</td>
</tr>
<tr>
<td align="right"><font face="Verdana"
size="1"><small>Attachment</small></font></td>
<td align="left">
<input name="attachment" type="file" size="30"></td>
</tr>
</table>
<p align="center">
<input type="submit" name="Submit" value="Submit">
</p>
</div>
</form>
</body>
</html>

*****************
** attach2.asp **
*****************
<%
on error resume next
Set JMail = Server.CreateObject("JMail.SMTPMail")
Set upload = Server.CreateObject( "w3.Upload" )
JMail.ServerAddress = "mail.housewall.com"

' you can repeat this if you have more than one file,
' or you can utilise part of the simple mail script
if upload.form("attachment").isFile then
set attachment = upload.Form("attachment")
JMail.AddCustomAttachment attachment.filename, attachment.item
end if

JMail.Sender = upload.form("sender")
JMail.Subject = upload.form("subject")
JMail.AddRecipient upload.form("recipient")
JMail.Priority = 3
JMail.body = "Your Online Information Request Form Has Been Completed
With The Following Info:" & vbcrlf
JMail.appendtext "----------------------------------------------------------------------"
& vbcrlf
JMail.appendtext "Name: " & upload.form("name") & vbcrlf
JMail.appendtext "Address: " & upload.form("address") & vbcrlf
JMail.appendtext "Email Address: " & upload.form("sender") & vbcrlf
JMail.appendtext "Comments: " & upload.form("comment") & vbcrlf
JMail.execute
response.redirect upload.form("redirect")
%>


*****************
** attach3.htm **
*****************
<html>
<head>
<title>Mail Sent</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<meta http-equiv="pragma" content="no-cache">
<meta name="expires" content="now">
<meta name="author" content="Justin Reid">
<meta name="author" content="SCS Technology Solutions Limited">
<meta name="author" content="http://www.scstechsolutions.co.uk">
</head>

<body bgcolor="#FFFFFF">
<div align="center">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><font face="Verdana, Arial, Helvetica, sans-serif">Thank You<br>
Your e-mail has been sent</font></p>
</div>
</body>
</html>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Attaching pdf to html email using jmail.appendHTML & JMail.AddAttachment Vix Java 1 01-26-2005 01:35 PM
How to use Jmail in c# web application =?Utf-8?B?cm91cm91?= ASP .Net 2 03-05-2004 05:55 PM
Sending mail from a code-behind .cs module using JMail, ASPEmail? Preston Crawford ASP .Net 0 02-04-2004 04:58 PM
asp.net and Jmail Ingrid ASP .Net 1 10-28-2003 01:32 PM
Sending Mail without CDO or JMail Ron ASP .Net 2 06-30-2003 10:13 PM



Advertisments