Sorry, got ahead of myself. Forgot to add the recordset. Updated code
as follows:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../../Connections/connReclaim.asp" -->
<%
Dim rsT__varR
rsT__varR = "1"
If (Request.QueryString("hdnrma") <"") Then
rsT__varR = Request.QueryString("hdnrma")
End If
%>
<%
Dim rsT
Dim rsT_numRows
Set rsT = Server.CreateObject("ADODB.Recordset")
rsT.ActiveConnection = MM_connReclaim_STRING
rsT.Source = "select idlot, idrma, partdesc, partnum, phmodel, dockqty
from dbo.lotinfo where idrma = '" + Replace(rsT__varR, "'", "''") +
"'"
rsT.CursorType = 0
rsT.CursorLocation = 2
rsT.LockType = 1
rsT.Open()
rsT_numRows = 0
%>
<%
' Create the JMail message Object
set msg = Server.CreateObject( "JMail.Message" )
' Mail server requires sender and receiver data first
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.From = "in**@repairresource.com"
msg.AddRecipient Request.Form("hdnemail")
' Get the form data
name = Request.Form("hdnname")
subject = "Repair Resource :: Auto-Receipt for RMA# " &
Request.Form("hdnrma")
' Enter the sender data
msg.FromName = "Repair Resource, Inc."
' Setup the correct mail sending user data
msg.MailServerUserName = "in**@repairresource.com"
msg.MailServerPassword = "sj5xvrnn"
' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true
' The subject of the message
msg.Subject = subject
' And the body
msg.body = "The contents of RMA#:" & Request.Form("hdnrma") & "have
been received into our system to be processed. Below are the results:"
$ vbCrlf & vbCrlF
AppendText
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rst_numRows = rst_numRows + Repeat1__numRows
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<meta http-equiv="refresh" content="5;URL=reclaimapp.asp">
<link href="../../style/style.css" rel="stylesheet" type="text/css" />
<link href="../../style/newRepairStyle.css" rel="stylesheet"
type="text/css" />
</head>
<body>
<form name="frmemail" id="frmemail" method="post" action="">
<font color="#000000" face="Verdana, Arial, Helvetica,
sans-serif"><font size="2">
<%
' Now send the message, using the indicated mailserver
if not msg.Send("mail.repairresource.com" )then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Your email confirmation message was sent
succesfully....Thank You!"
end if
' And we're done! the message has been sent.
%>
</font></font>
</form>
<p> </p>
</body>
</html>
<%
rsT.Close()
Set rsT = Nothing
%>
Mangler wrote:
Here is the code, maybe it will explain what I need better:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
' Create the JMail message Object
set msg = Server.CreateObject( "JMail.Message" )
' Mail server requires sender and receiver data first
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.From = "in**@repairresource.com"
msg.AddRecipient Request.Form("hdnemail")
' Get the form data
name = Request.Form("hdnname")
subject = "Repair Resource :: Auto-Receipt for RMA# " &
Request.Form("hdnrma")
' Enter the sender data
msg.FromName = "Repair Resource, Inc."
' Setup the correct mail sending user data
msg.MailServerUserName = "in**@repairresource.com"
msg.MailServerPassword = "**********"
' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true
' The subject of the message
msg.Subject = subject
' And the body
msg.body = "The contents of RMA#:" & Request.Form("hdnrma") & "have
been received into our system to be processed. Below are the results:"
$ vbCrlf & vbCrlF
(((??????????))))
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rst_numRows = rst_numRows + Repeat1__numRows
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<meta http-equiv="refresh" content="5;URL=reclaimapp.asp">
<link href="../../style/style.css" rel="stylesheet" type="text/css" />
<link href="../../style/newRepairStyle.css" rel="stylesheet"
type="text/css" />
</head>
<body>
<form name="frmemail" id="frmemail" method="post" action="">
<font color="#000000" face="Verdana, Arial, Helvetica,
sans-serif"><font size="2">
<%
' Now send the message, using the indicated mailserver
if not msg.Send("mail.repairresource.com" )then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Your email confirmation message was sent
succesfully....Thank You!"
end if
' And we're done! the message has been sent.
%>
</font></font>
</form>
<p> </p>
</body>
</html>
Mangler wrote:
What if I need to have a repeat region in there to show all of the
contents received not just one line. Example order:
RMA#: 1057
lot# Part Desc Qty
1 flip 50
2 lcd 200
3 back 75
ETC....
The information above is coming from a query.
Evertjan. wrote:
Mangler wrote on 19 okt 2006 in microsoft.public.inetserver.asp.general:
>
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. When we receive the submission in
our system an auto-receipt email will be sent. What I need to have
happen (and cant figure out) is that email to include what was received
not just a on liner saying it was received. The information is pulled
from the db with a query. Anyone got any suggestions?
>
This is realy simple.
>
The jmail email is build up from asp code statements.
>
is you want to add a line based on variables that came from a
<form method='post'in your submitter page, you can do this:
>
<% 'vbscript assumed
>
>
Set JMail = Server.CreateObject("JMail.SMTPMail")
.....
>
JMail.Sender = Request.Form("email")
JMail.AddRecipient Request.Form("email")
JMail.Subject = "Received from: " & Request.Form("name")
>
JMail.Body = "Hi," & vbCrLf & vbCrLf & "You just entered:" & vbCrLf
>
JMail.AppendText Request.Form("email") & " (your emailaddress)" & vbCrLf
JMail.AppendText Request.Form("name") & " (your name)" & vbCrLf
JMail.AppendText Request.Form("street") & " (your street)" & vbCrLf
>
etc., etc.
>
JMail.Execute
......
%>
>
Be careful to follow which statements need a = and which need arguments
without the =, see the specs.
>
>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)