|
| |
|
|
donovan13
Posts: 5 Joined: 5/9/2008 Status: offline
|
ASPEmail [Persits] - 5/9/2008 11:26:56
My company is having us move to a different web server. On the old one I had ASPMAil [ServerObjects] and used it in forms for customers to loop through a form and send all the fields. I am not a programmer. Just a helpful admin. <grin> I've been trying to incorporate that same loop into ASPEmail. A simple static send test works fine where I send a "test" message with test in the body. With a number of different forms and authors on our system with all sorts of field names, I just need ASPEmail to loop thru the form and send it along. this code worked with ASPMail. I thought this part was ASP scripting rather than form specific so was hoping it would work with the ASPEmail: strMsgHeader = "Form Information Follows: " & vbCrLf for i = 1 to Request.Form.Count strMsgInfo = strMsgInfo & Request.Form.Key(i) & " - " & Request.Form.Item(i) & vbCrLf next strMsgFooter = vbCrLf & "End of form information" Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter It was crude but worked on the old server. Both servers are Win2003 servers. All the sample scripts I've found for ASPEmail show how to send a static message. I can make that work but can't seem to see what is not working in the above loop. I can submit the form but the results never show up. Any suggestions?
|
|
|
|
donovan13
Posts: 5 Joined: 5/9/2008 Status: offline
|
RE: ASPEmail [Persits] - 5/9/2008 16:19:30
Yes it does and I have ti tht way in the loop section. :) I just copied out of the original one because it was handy. Meant to fix that and forgot. I changed it to Mail.Body in the actual test form.
|
|
|
|
donovan13
Posts: 5 Joined: 5/9/2008 Status: offline
|
RE: ASPEmail [Persits] - 5/10/2008 22:47:32
quote:
ORIGINAL: Spooky What is the complete script? Have you also changed the SMTP server? Does the script work without the new loop? When you say the results dont show up - do you mean the email never gets sent or is the content of the email not what you expect? The complete script doesn't work yet. I have a test script that does.
' this works fine:
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "localhost"
Mail.From = "webform@exaltfinancial.com" ' Specify sender's address
Mail.FromName = "BD" ' Specify sender's name
Mail.AddAddress "donovan@rten.org"
Mail.AddBCC "donovan.mora@gmail.com"
Mail.Subject = "test"
Mail.Body = "test form process from web site 8.30pm"
On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
This doesn't work- tried commenting out most of the query part.
' change to address of your own SMTP server
strHost = "localhost"
If Request("Send") <> "" Then
Set Mail = Server.CreateObject("Persits.MailSender")
' enter valid SMTP host
Mail.Host = strHost
Mail.From = "webform@exaltfinancial.com"
Mail.FromName = "Exalt Web Form" ' optional
' Mail.AddAddress "drbob@exaltfinancial.com", "Dr. Bob"
Mail.AddAddress "donovan.mora@gmail.com"
Mail.AddBCC "donovan@rten.org"
Mail.AddReplyTo "drbob@exaltfinacial.com"
Mail.IsHTML = false
' message subject
Mail.Subject = "Employee Form Feedback"
' message body
strMsgHeader = "Form information follows" & vbCrLf
' for each qryItem in Request.QueryString
' strMsgInfo = strMsgInfo & qryItem & " - " & request.querystring(qryItem) & vbCrLf
' next
' strMsgFooter = vbCrLf & "End of form information"
Mail.Body = strMsgHeader ' & strMsgInfo & strMsgFooter
'On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
End If
This site uses localhost. works in script 1. On script 2, I get no error and I get the confirmation page - but no email. script 1 has no conf page. I do get the email. :) I sent a message to support at aspemail.com also but have no response as yet. I dont' understand this language so when I cobble things together I am not sure what is broken. Thanks for any insight. :)
|
|
|
|
donovan13
Posts: 5 Joined: 5/9/2008 Status: offline
|
RE: ASPEmail [Persits] - 5/11/2008 0:14:27
quote:
ORIGINAL: Spooky Is an email sent if you use this script? ... Secondly - is the statement "If Request("Send") <> "" Then" valid? is, are you posting from a form and is that value populated? Once I added the recipient, I got a Mail sent. It just came in. So the email came through. Second question: I took most of the form right of Persits sample on http://www.aspemail.com/manual_02.html'' first sample shown in that manual. so far so good. :)
|
|
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
|
|
|