473,465 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Function dosent seem to get Parameters??

80 New Member
Hi Im writing a function but it dosnt seem to fetch the parameters I send it. Could anybody have a look at this please?

Expand|Select|Wrap|Line Numbers
  1. <%@ LANGUAGE="VBSCRIPT" %>
  2. <%
  3. Set fs                = Server.CreateObject("Scripting.FileSystemObject")
  4. Set JMail            = Server.CreateObject("JMail.SMTPMail")
  5.  
  6. Jmail.serveraddress = "[REMOVED]"
  7. DIM strFunction
  8.  
  9. function send_mail( cmd, typeMail, mailTo, mailFrom, userID, userUID, userName, caseProduct, caseID, mailTitel, mailBody, notifyLine )
  10.  
  11.   if fs.FileExists(Server.MapPath("../[REMOVED]/" & typeMail & ".asp")) then
  12.  
  13.     Set f                = fs.OpenTextFile(Server.MapPath("../[REMOVED]/" & typeMail & ".asp"), 1)
  14.     mailBody            = f.ReadAll
  15.     f.Close
  16.  
  17.     mailBody = Replace(mailBody, "[GAR:TRADEPRODUCT]", caseProduct)
  18.     mailBody = Replace(mailBody, "[GAR:TRADETO]", mailTo)
  19.     mailBody = Replace(mailBody, "[GAR:TRADEFROM]", userName)
  20.     mailBody = Replace(mailBody, "[GAR:TRADEID]", caseID)
  21.     mailBody = Replace(mailBody, "[GAR:NOTIFYLINE]", notifyLine)
  22.  
  23.   JMail.Sender        = mailFrom
  24.   JMail.SenderName    = "[REMOVED]"
  25.   JMail.Subject        = mailTitel
  26.   JMail.Body        = mailBody
  27.   JMail.Priority    = 3
  28.  
  29.   JMail.AddRecipient mailTo
  30.  
  31.   if JMail.Execute then
  32.     send_mail = 1
  33.   else 
  34.     send_mail = 0
  35.   end if
  36.  
  37.   JMail.ClearRecipients 
  38.  
  39.   else
  40.     send_mail = 0
  41.   end if
  42. end function
  43.  
  44. strFunction = send_mail("first","sendfirstmail","[REMOVED]","[REMOVED]","1","1000","Frederik","Mobil","32","Tillykke","HEj ven","hej igen") '(Dummi data)
  45.  
  46. if strFunction  = 1 then
  47.   Response.Write "done"
  48. else
  49.   'Debug
  50.   Response.Write cmd & typeMYMail & mailFrom & userID
  51.   Response.Write Server.MapPath("/[REMOVED]/" & typeMail & ".asp")
  52. end if
  53. %>
Jun 23 '10 #1
0 1330

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: brianj7675 | last post by:
Basically i'm trying to write a previous next link in order to go to the next page in my database(similar to google's with numbers in the middle for pages the user wants to jump to. My only...
12
by: TTroy | last post by:
For function definitions (not declarations/prototypes), is it necessary to put void in the emptry braces if the function is to receive no parameters? Does this turn any error checking off or cause...
5
by: rbfish | last post by:
Hi, How can I call a virtual base function with variable parameters? like, class base { public: int printf(const char *fmt, ...) { // do anything here.
1
by: mayur_hirpara | last post by:
Hi, I am looking to call a javascript function using variable number of parameters. Suppose I have a function foo(param) { ..... } I want it to be called unpredictebly when certain action...
8
by: Ian | last post by:
Consider that I have a "non-extern" function that takes no parameters. Which of the following would be ANSI C90 compliant: void hello(void) { printf("Hello\n"); } or
10
by: rh0dium | last post by:
Hi all, Below is a basic threading program. The basic I idea is that I have a function which needs to be run using a queue of data. Early on I specified my function needed to only accept basic...
15
by: nadsweb | last post by:
Hi I would really appreciate some help. I'm not very good at Access and right now I have to make an Database for part of an Internship project. So this Q might seem silly to you but I really don't...
5
by: michaelscript | last post by:
Here is a simple code : <input type="checkbox" id="ck1" onclick="func1('para1')"> <script> alert(ck1.onclick); //result of this: ///////////////////// function anonymous () { ...
2
by: Markus Dehmann | last post by:
I have an abstract base class called Data. It has a pure virtual function virtual void write(std::ostream& out) =0; which writes the internal data to a stream. Now the problem is that this is...
4
by: supriyamk | last post by:
Hi, i am trying to copy files of a certain type into a different directory using perl, The copy function doesnt seem to work. my @dir_list; my $sub_dir; my $file_name1; ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.