473,324 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Jmail & W3 Upload...

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="bk*****@tcbfixtures.com">
<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>
Jul 19 '05 #1
0 2933

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lasse Edsvik | last post by:
Hello I use this code to send massmail with an attachment using JMail 4 proffessional. and the attachment seems to be attached but when i open it the first time my system32 folder opens..........
2
by: Kingdom | last post by:
I have a SelectBoxes.asp page that is working with multiple selection dropdown boxes to extract data and total the selection prices. Tom & Bob were kind enough to give me a big help getting this...
4
by: Kingdom | last post by:
Having a problem with a jmail email script and cannot seem to solve this error any sugestions welcome. Error shows in browser as Microsoft VBScript runtime error '800a01f4' Variable is...
2
by: rourou | last post by:
Hello everyone In VB.NET i can use Jmail to send a mai code Dim JMai JMail = Server.CreateObject("JMail.Message" JMail.silent = Tru JMail.Logging = Tru JMail.Charset = "gb2312
8
by: Mangler | last post by:
I am new to Jmail/ASP and either need some help or someone to tell me I am stupid... I got Jmail to work fine. My problem is I need to send an email based on somthing a customer submitted. ...
0
by: johnet | last post by:
Error: jmail.SMTPMail error '8000ffff' Cannot open file L:/ems/mail/hi.html Code: <% DIM strEmail, strFirstName, strLastName, strSubject, strComments, Mailer
0
by: vernon1231 | last post by:
Hi! PLEASE need help! My aim is to make a newsletter, therefor I need a picture to go a long with the mail I am creating from a mailinglist. When I am opening my mail I dont get my picture but a...
4
by: cgrudzinski | last post by:
Hello, I have JMail working without attachments but now want to start using this feature. When using the .addattachment though the email received contains the binary data of the attachment - see...
2
borisding
by: borisding | last post by:
Hi there, I'm using Jmail for sending email with some attachments. Basically, I will need to send out email with the contents in unicode characters such as Simplified Chinese, Japanese etc. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.