I have an html page with standard contact us type form. This when posted goes to an asp page which stores the data and then sends an email to me. It then redirects back to the original email form with a message thanking the user for the contact.
The problem is I am getting multiple spoof emails which are being generated form the asp page. Some one is accessing and then just refershing the page so it generates numerous emails.
Is there a way of either hiding the asp page in the original HTML form or checking that the page has been called by the html form rather than just refreshed.
I have a class that access an MS SQL database.I have another class also accesses an MS SQL database and this second class uses objects from the first class.I have a third class using the DB and objects of the second class.
Each of these classes contain all the code needed to access the database and this means much duplicated code. What I'd like to know is if there is a way to avoid the duplicated code?
I know I could write the code once,then do an #include to include the code into the class,but that still means multiple occurances of the code.
<% RMABarCode = Session("rmaID") IF Len(RMABarCode) Then response.write "<img src='barcode.asp?code=" & RMABarCode & "&height=25&width=1&mode=code39'>" End If %>
But I need to be able to display that barcode multiple times.
Say the user needs 4 displayed, he/she will enter the number and it shows that many.
I have a project where I want an email to be sent at a certain time, say 10 PM every night if there are new hits to my site. The email will be only going to my email address. does any one know of a way to do this?
I am testing a mass emailer that I will be sending out this week. I use ASP to read email addresses from a db table which is contains a list of email addresses of those who will receive the email blast. I have included myself to see the results of the test. I noticed when I received the email, the body or content of the email was repeated as many times as there are people in the email list the code was reading from. Can someone tell me what I did wrong in the code below?
my project is an ordering system, which allows users to order multiple products by entering in the product quantities in a text box. The technologies I am using are Macromedia Dreamweaver MX, ASP VBscripting, and a MS Access database to hold all the products.
Could anyone please tell me how do I create and order list that allows me to specify multiple products at the one time and also to allow me to enter in the quantity of each product? The next page should then show a list of the products ordered. After this is confirmed the product numbers and quantities need to be stored in an order details Table within the database.
the script works but i wanna have this email to be sent to more than one recipient (see below code in red). I did add another ObjMail1.To tag for another email recipient but doesnt work.
<%Response.Buffer=True%> <html> <head> <title>Thanks</title><% Dim salutationname,salutation,t1name,t1,t2name,t2,t3na me,t3,t4name,t4,highqualificationname,highqualific ation,checkname,check,MyNewRandomNum Randomize MyNewRandomNum = Round(Rnd * 100000000000)+1 salutationname = "Salutation" salutation = Request.Form("salutation") t1name = "Name" t1 = Request.Form("t1") t2name = "Telephone number" t2 = Request.Form("t2") t3name = "Email" t3 = Request.Form("t3") t4name = "Age" t4 = Request.Form("t4") highqualificationname = "Qualifications" highqualification = Request.Form("highqualification") checkname = "Options" check = Request.Form("check") Dim stname,st stname = "Comments" st = Request.Form("s1") Dim ObjMail1,ObjMail2 Set ObjMail1 = Server.CreateObject("CDONTS.NewMail") 'CHANGE THE EMAIL ADDRESS IN QUOTES BELOW TO THE ADDRESS YOU WANT THIS MAIL SENT ObjMail1.To = "info@abc.com "
Set ObjMail2 = Server.CreateObject("CDONTS.NewMail") ObjMail2.To = t3 ObjMail2.From = "info@abc.com" ObjMail2.Subject = "Thanks for your enquiry."& "" & "Your QUEUE NO: " &Trim(MyNewRandomNum)& "" ObjMail2.Body = " Hello " &"" & t1 & ".You have submitted your enquiry to us. You will hear from us shortly. " & "" & ":" & st &"" ObjMail2.Send Set ObjMail2 = Nothing Response.Write"<center />Thank You.You will hear from us soon. " %>
I'm sending mail using below code. It works fine. How can I send email to more than one address. I wanna add one more address in .to feld or in .cc
Set cdoMessage = Server.CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = "abc@abc.com" .To = "xyz@xyz.com" .Subject = "abc" .HtmLBody = body .Send End With
using the code below is how to send email using asp;
<% Set myMail=CreateObject("CDO.Message") myMail.Subject="Sending email with CDO" myMail.From="martialdc@hotmail.com" myMail.To="amboy416@yahoo.com.ph" myMail.TextBody="This is a message." myMail.Send set myMail=nothing %>
but i encounter error with this message: There is a problem with the page you are trying to reach and it cannot be displayed.
i dont know what and where is the problem? i just copy the code my asp page;; what code should i write?
I'm trying to send an email (jmail) to everyone in a recordset but I'm getting no joy,I keep getting a "not all servers received message" error or something similar, can someone please take a look at this code and see if they can spot my glaring errors ?
<% set rsetReminder = Server.CreateObject("ADODB.Recordset") rsetReminder.ActiveConnection = MM_connmessages2_STRING rsetReminder.Source = "SELECT * FROM accessgroups WHERE ((accessgroups.fldjoined<Date()-14)) AND fldGroup = 'Guest' ORDER BY fldjoined DESC" rsetReminder.CursorType = 0 rsetReminder.CursorLocation = 2 rsetReminder.LockType = 3 rsetReminder.Open() rsetReminder_numRows = 0 %> <% While NOT rsetReminder.EOF firstname = rsetReminder.Fields.Item("fldFirstname").Value lastname = rsetReminder.Fields.Item("fldLastname").Value emailadd = rsetReminder.Fields.Item("fldEmailAddress").Value username = rsetReminder.Fields.Item("fldusername").Value password = rsetReminder.Fields.Item("fldPassword").Value usrid = rsetReminder.Fields.Item("fldnewuserid").Value
Here's the script I'm using now to send me a picture selected in a form (from a browse button type thing), sent to me in the attachments.
Right now it will only send the one picture (field name="Attachment"), how can I change this script to send multiple (for example; ten) pictures in the attachments from the form??
I'm a PHP programmer who for some reason was tasked with fixing some code on an asp page. I have what I feel should work, but I am getting this error:
CDO.Message.1 error '8004020c'
At least one recipient is required, but none were found.
/admin/mass_email_monthly.asp, line 47
Line 47 being this line: objMessage.Send
Now I want to have multiple recipients pulled from the database as illustrated in the code, but it isn't working. I have no idea why, and I have no idea what that error message means? Can anyone point me in the proper direction of a tutorial that can help? OR possibly show me where my syntax is wrong?
I am using this script to submit my form fields into the body of my email:
*********************************************** Dim strBody dim ix, formElementName, formElementValue strBody = "Results of form submitted at " & Now() & vbCrLf & CrLf For ix = 1 to Request.Form.Count formElementName = Request.Form.Key(ix) formElementValue = Request.Form.Item(ix) strBody = strBody & (formElementName & ": " & formElementValue & vbCrLf) Next
*********************************************** I'm completely new to vbscript and have been searching all over the net for an example of this script being used with mutliple fields with absolutely no luck.
The closest I've come to getting something back from this thing is when I tested the script with these elements:
Its seems the answer to my problem lies in defining the 'Key' and possibly the 'Item' parameters but I haven't been able to find any documentation on these terms. Can someone out there please save me from what probably is a very simple solution?
well, the following script that i wrote using the aspSmartMail component, keeps timing out on me. i tried setting the timeout higher through both IIS and in the script itself, but all that does that it take longer for it to timeout.
i have written a few email programms using this component, so i don't think it is the component. i have just never tried sending emails with it automatically that each have certain unique fields in it. well anyways, here is the code:
I've written a page that uses a emailer component and it keeps timing out. It takes 2-3 seconds to send each mail, gets part way through the list of recipients and dies.I have tried changing the Script Timeout setting in IIS to some huge number(2147483647?).I hve tried setting Server.ScriptTimeout = 0 and Server.ScriptTimeout =2147483647. None of these make any difference. What can I do now?
There is 600 lines of code. This page gets available rooms from RoomInfo and compares the rooms againest rooms in use from EventRoom by RoomID. RoomInfo RoomID field is text. It can contain multiple rooms (i.e. 5,6,7) based on room setup type. I had to do it this way so that users could book multiple rooms based on configuration and how many people.
Line 412 is where the time out occurs. Also if I use split on rs2(RoomID) {line 415} then I can't start at 0, I have to start on 1. Which means 1 room is not being checked. I tried to annotate the code as best as possible. The page is zipped so you can download and view it. It will bomb if you try to run it on the server it is being hosted on.
I've done this before but cannot remember how. I have a field (FIELDNAME) in a sql2k environment. I just need to know how many times an "_" appears in that field. I cannot figure it out right now.
If Now() >= tstart1 OR Now() <= tend1 Then 'if tcurrent > tstart1 or tcurrent < tend1 then strLink1 = "/images/2.jpg" else strLink1 = "/images/1.jpg" end if
When I look at the page, the image never changes. It just always displays 2.jpg and not 1.jpg. I need help ASAP!
I am trying to simply print to screen all the data in a colum from a .mdb file. Later I will do more advanced things but for now this would be good.
What I have WORKS, but takes a LONG time to retrieve the first record, if I tell it to retrieve more than one row it will time out. I was hoping to connect to the file directly and not have to create an ODBC connection. The code seems simple enough and the server is no dud (p4 2.4ghz) so do I need to setup a DSN and connect to it that way? Code:
im making the web site for a small internet radio station and would like to add the feature to show which DJs are currently on air. I would like to do this by swaping an image at certain times or even dates.
For instance
dim image
if time = 05:15:00 then image = bob else if time = 23:30:00 then image = dave end if
Something along those lines but I dont know the exact code required to do this.
Would be really greatful for any help, I think it would be a nice feature for our listeners.