W3 Jmail

Discussion in 'ASP General' started by Mangler, Oct 19, 2006.

  1. Mangler

    Mangler Guest

    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?

    Danny
    Mangler, Oct 19, 2006
    #1
    1. Advertising

  2. Mangler

    Evertjan. Guest

    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)
    Evertjan., Oct 19, 2006
    #2
    1. Advertising

  3. Mangler

    Mangler Guest

    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)
    Mangler, Oct 19, 2006
    #3
  4. Mangler

    Mangler Guest

    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 = ""
    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 = ""
    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>&nbsp;</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)
    Mangler, Oct 19, 2006
    #4
  5. Mangler

    Mangler Guest

    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 = ""
    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 = ""
    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>&nbsp;</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 = ""
    > 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 = ""
    > 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>&nbsp;</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)
    Mangler, Oct 19, 2006
    #5
  6. Mangler

    Evertjan. Guest

    Mangler wrote on 19 okt 2006 in microsoft.public.inetserver.asp.general:

    > Sorry, got ahead of myself. Forgot to add the recordset. Updated code
    > as follows:
    > [.............]


    [Please do not toppost on usenet]

    Sorry, I am not going to analyze or write your code for you,
    especially your database work,
    that was not your OQ [original question].

    You asked, I seem to remember, how to send a email on submission,
    which has nothing to do with a database.

    Try to send your info to the webpage for starters with multiple:

    response write aLineOfText & "<br>"

    and when that works as expected, change that to:

    JMail.AppendText aLineOfText & vbCrLf

    Read the jmail specs, thy have examples, I remember.

    ==============

    Do you write or understand your own code, or do you
    just use someone elses?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Oct 19, 2006
    #6
  7. Mangler

    Mangler Guest

    I use dreamweaver and do the DB work. I wasnt asking you to write this
    for me, sorry bout that. I have everything done but can't figure out
    how to get the repeat region in the email.


    Evertjan. wrote:
    >
    > Do you write or understand your own code, or do you
    > just use someone elses?
    >
    Mangler, Oct 19, 2006
    #7
  8. Mangler

    Evertjan. Guest

    Mangler wrote on 19 okt 2006 in microsoft.public.inetserver.asp.general:

    >
    > Evertjan. wrote:
    >>
    >> Do you write or understand your own code, or do you
    >> just use someone elses?
    >>


    [Repeat request: Please do not toppost on usenet]

    > I use dreamweaver and do the DB work.


    What has the database to do with your Q?

    If you can get your info on screen with response.write,
    you can get it in your mail with JMail.AppendText.

    Do you agree?
    if not, what is your agrument for that?

    > I wasnt asking you to write this
    > for me, sorry bout that. I have everything done but can't figure out
    > how to get the repeat region in the email.




    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Oct 19, 2006
    #8
  9. Mangler

    Mike Brind Guest

    If you want to get the recordset results to display in the email, I strongly
    advise you to move away from Dreamweaver generated code and learn how to
    create a recordset manually and output the results yourself. Until you
    learn how to do this properly, and understand how it works, you will never
    have the level of control that you would ideally want.

    Dreamweaver's repeat regions are intended for the output of records into
    html tables. I assume your email will be in plain text because you have
    used & vbCrLf in the body, in which case html plays no part in it.
    Consequently, a repeat region cannot be used in this context.

    --
    Mike Brind



    "Mangler" <> wrote in message
    news:...
    > 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 = ""
    > 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 = ""
    > 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>&nbsp;</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 = ""
    >> 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 = ""
    >> 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>&nbsp;</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)

    >
    Mike Brind, Oct 19, 2006
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron
    Replies:
    2
    Views:
    444
    Showjumper
    Jun 30, 2003
  2. Ingrid

    asp.net and Jmail

    Ingrid, Oct 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    420
    Ingrid
    Oct 28, 2003
  3. Preston Crawford
    Replies:
    0
    Views:
    415
    Preston Crawford
    Feb 4, 2004
  4. =?Utf-8?B?cm91cm91?=

    How to use Jmail in c# web application

    =?Utf-8?B?cm91cm91?=, Mar 5, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    3,576
    Kevin Spencer
    Mar 5, 2004
  5. Vix
    Replies:
    1
    Views:
    3,400
    Thomas Weidenfeller
    Jan 26, 2005
Loading...

Share This Page